Search for question
Question

UIC CS 341, Spring 2024 Homework 7 Due: Wednesday 4/17/2024 at 11:59pm Exercise #1 - ELIZA Chatbot in Prolog (50 points) ELIZA is a very simple chatbot by modern standards, and was created to explore communication between machines and humans. Read more about ELIZA here: https://en.wikipedia.org/wiki/ELIZA. Also try interacting with ELIZA yourself! You can do so here: https://web.njit.edu/~ronkowit/eliza.html. You will find a barebones version of ELIZA here: https://swish.swiprolog.org/example/eliza.pl. The rules here make use of lists in Prolog. It is recommended that you read at least one the following links to learn more about lists in Prolog: · https://users.aber.ac.uk/ais/Prolog/lists.html . https://www.tutorialspoint.com/prolog/prolog_lists.htm Add on to the barebones version of ELIZA to implement the following rules: Pattern Response Template 1 my singleWord 2 me 3 tell me about your singleWord 1 am i 2 do you believe you are 2 1 you 2 me 3 why do you think i 2 you A few notes about these rules: . The blank spaces in a pattern, denoted by 1 or 2_or __ 3_, can be filled in with any sequence of words. For each of the patterns, the response include something from the user input. . Any of the blanks that are 1 or 3 may contain zero or more words. . In the first pattern with singleWord, the 2 piece may be empty, because singleWord guarantees at least one word between my and me. In the other patterns, 2 must contain at least one word. . In the first pattern, singleWord represents exactly one word within the user input. In your submission, include: · The code you added · A description of each piece of code you added, and an explanation of why each piece of code works · A demonstration of the code working by means of queries that have been answered correctly by ELIZA.