Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

S.O.S

Status
Not open for further replies.

dummy

MIS
Apr 3, 1999
2
US
hello, i have to write a programm in Prolog, it sounds very easy but it doesn't:

it shall implemente the semantic of have, give and sell...for..

the user can type: helen has a car. helen give tim a car...etc and the programm should save these information in the database.

and the user should be able to ask questions in two ways:who has and what does sb has like who has a car? what does helen have. was does tim have..etc and the answer should be right. similar for :helen sell tim a car for 1000 dollar.

I have written the programm this way: at first read input, turn a sentence into a list, save in database.( assert(database(Sentence)).but it just works for "have", not "give" and "sell".

i can not delete the information which is not correct after the user gives new sentence, in my example i have to add tim has a car and delete helen has a car after the user the 2nd sentence types.

please give me some suggestions.
 
please see " the interactive system" below.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top