[rules-users] Logic Problems & drools

Ellen Ning Zhao enzhao at gmail.com
Sat Aug 18 07:06:32 EDT 2007


The result report of Drools Puzzle Round 1 will be out today. I'll post
the link in Wiki in several hours.....

Mark Proctor wrote:
> Ellen runs a little "logic club" Dr Gernot Starke one the last one,
> see mailing list archives for the problem. The winner gets to post the
> next puzzle, so stay tuned and win, so you can post your puzzle for
> people to try :) I believe that gernot will post the details of his
> solution to the blog soon.
>
> Mark
> MarkA wrote:
>> I am a big fan of the logic problem puzzles (the ones with the grids)
>> and
>> would like to play with drools to solve a few - just for a laugh and
>> to see
>> if it can be done.
>> I found a pretty simple one:
>> ----------------------------
>> Mrs. Robinson's 4th grade class took a field trip to the local zoo.
>> The day
>> was sunny and warm - a perfect day to spend at the zoo. The kids had
>> a great
>> time and the monkeys were voted the class favorite animal. The zoo
>> had four
>> monkeys - two males and two females. It was lunchtime for the monkeys
>> and as
>> the kids watched, each one ate a different fruit in their favorite
>> resting
>> place. Can you determine the name of each monkey, what kind of fruit
>> each
>> monkey ate, and where their favorite resting place was?
>>     1. Sam, who doesn't like bananas, likes sitting on the grass.
>>     2. The monkey who sat on the rock ate the apple. The monkey who
>> ate the
>> pear didn't sit on the tree branch.     3. Anna sat by the stream but
>> she didn't eat the pear.     4. Harriet didn't sit on the tree
>> branch. Mike doesn't like oranges. ---------------------
>>
>> But I can't get the logic working, has anyone done any other examples
>> for
>> drools (or maybe converted the monkey & banana or cannibal ones from
>> CLIPS)?
>>
>> I have looked at the golf one in the examples but it's a bit simple.
>> In that
>> one it uses variables for each bit $bobsColour etc. and then uses
>> those in
>> later rules. I tried it with the one above but I kept needing to
>> refer to a
>> variable that I hadn't yet defined and I couldn't define it as it
>> needed to
>> refer to another one and so on...
>>
>> Many thanks,
>>
>> Mark.
>>
>>
>>   
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list