Sorry Ovid, but
badguy CAN'T steal the gold. It's not possible with your rule set:
steals(PERP, STUFF) :-
....
owns(VICTIM,STUFF),
not(knows(PERP,VICTIM)).
knows(badguy,merlyn).
owns(merlyn,gold).
or in English:
* And the person doesn't know the person who owns the stuff they might steal.
On the other hand the badguy can steal your rubies:
?- steals(badguy,X).
X = rubies
Yes
and so can merlyn but only if we're allowed to add one more fact:
thief(merlyn).
?- steals(merlyn,X).
Yes
I think you might want to meet merlyn really fast, and maybe get him to introduce you to badguy. :)
jarich
Update: Oops. Forgot that the PERP had to be a thief in order to be able to steal. Which would have meant that merlyn couldn't have stolen the rubies and I would have appeared to not have known what I was talking about. :) I've fixed this now of course.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.