:- op(30, fx, hi).
:- op(60, fx, how).
:- op(30, fx, are).
:- op(30, fx, answer).
:- op(50, fx, do).
:- op(40, fx, you).
:- op(20, fx, these).

hi computer :- write('Hi Barry.'), nl.
how(are(you)) :- write('Grand. Looking forward to a good chat.'), nl.
how(do(you(answer(these(questions))))):-
	       write('I''m given a database of facts and rules which I am able to follow but'), nl,
	       write('to be honest I don''t really understand them.'), !.

:- op(30, fx, know).
:- op(20, fx, anything).
:- op(10, fx, about).

do you know anything about ai :- write('Not much. I just pretend to be intelligent.'), nl.

:- op(50, fx, in).
:- op(40, fx, what).

in(what(way)) :- write('Well basically I can only answer a limited number of questions.').

thanks :- write('no problem').

:-op(40, fx, ok).

ok(bye) :- write('You take care now! Don''t forget to write.').

:-op(50, fx, very).

very funny :- write('Are you trying to annoy me, or what!?').
sorry :- write('for what? for being a complete idiot?').

:-op(100, fx, no).
:-op(90, fx, need).
:-op(80, fx, for).

no need for that :- write('You started it with your question about how many students I see.').

:- op(90, fx, tell).
:- op(80, fx, me).
:- op(57, fx, many).
:- op(56, fx, students).

tell me how many students do you see :- write('Sorry, I can''t see. You need to install the latest computer vision software.').
tell me how many students you see :- write('Sorry, I can''t see. You need to install the latest computer vision software.').
how many students do you see :- write('Sorry, I can''t see. You need to install the latest computer vision software.').

end_of_file.