I am modifying the Eliza program http://cs.nyu.edu/courses/fall11/CSCI-GA.2110-003/documents/eliza.pl trying to get it to print the system time when user asks - What Time is it? After hours of reading through manual I got my get_date_time_value() function to work. As in
get_date_time_value(Key, Value) :- get_time(Stamp), stamp_date_time(Stamp, DateTime, local), date_time_value(Key, DateTime, Value).
However I am at a loss as to how do I call this function from my rule which is defined as
rules([[time,0],[ [1,[_],0, [please,do,not,get_date_time_value(time,x),.], ['I',dont,know,the,time,.]]]]).
Yes this is a homework assignment and this might sound silly to experts ,but I am really new to Prolog programming even though I have quite some experience in object oriented and functional programming. No matter what parameters I pass to the get_date_time_value(time,X) function I am always getting an error. I spent all night on a hit an trial approach ,but nothing I do works. Any pointers will be great!! Thanks