Chatbot in Prolog

I am trying to create a chatbot (as an assignment) in the prolog, so far I have created a database in a .pl file, and I have listed a lot of possible conversations. I know that the prologue works like this, for example, if we have

Chatbot(good) 

and type

?-Chatbot(good). 

he will answer

yes or ture.

Now I don’t know how to use my database so that the program can work exactly like chatbot, for example, without having to write in the appropriate syntax:

Hello (typed by the user)

Hi there, (typed by the program automatically)

My database is as follows:

answer( question, [
[Yes, I am here]]).

question ([are you there?]) 
+2
source share
1 answer

Chatbot prototype I know that ELIZA is from Weizenbaum 1966.

Its implementation in Prolog is quite simple, as shown in The Art of Prolog by Sterling and Shapiro.

Googling "ELIZA Prolog", , / . . , .

+2

Source: https://habr.com/ru/post/1611999/


All Articles