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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple programming question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am doing my family tree using Prolog so that i can ask it simple questions like how many uncles does X have, who are they etc..

I am having problems writing the rule for brother and sister i realise i must have some line that says something like different(X,Y). because you cant be your own brother!
but Prolog doesn't recognise the term different, (this is the term my tutor gave me) can you help me please!
 
Hey, why don't you just add X<>Y or X\=Y (in SWI) in your brother-sister-somethingelse rule to check it?
 
hint : it doesn't recognize different but it does recognize equals - you have to think the other way round ! ------
please review FAQ183-874 - this will help you to get the best out of tt
[ &quot;you&quot; is not someone in particular - don't take it too personnal ]
 
hi im trying to make a program which will find solutions through a maze by calculating the values of two paths and the one with the highest path is a successor. is there any code i could use to help me? thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top