[rules-users] Logic Problems & drools

Dr. Gernot Starke gs at gernotstarke.de
Sun Aug 19 07:03:53 EDT 2007


Perfect writeup - I'll remember for my next solution...

I started a page in the JBoss-Wiki: http://wiki.jboss.org/wiki/ 
Wiki.jsp?page=JBossDroolsPuzzles

Gernot
Am 18.08.2007 um 21:04 schrieb Ellen Ning Zhao:

> have a look here:
>
> http://ningning.org/blog2/?page_id=122
>
> MarkA wrote:
>> Are there examples online somewhere then?
>>
>> I just want a few more examples to examine really. That and find  
>> out how to
>> run a drools app outside of eclipse without the noclassdefound error.
>>
>> I'll keep a look out on the list.
>>
>>
>> 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
>>>
>>>
>>>
>>
>>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

Dr. Gernot Starke
Doing IT Right

---
Willi-Lauf Allee 43, D-50858 Köln
gs at gernotstarke.de,
  +49 (0) 177 - 728 2570
http://www.gernotstarke.de
Blog: http://it-and-more.blogspot.com
****************************************
Das freie Portal für Software-Architekten:
http://www.arc42.de






More information about the rules-users mailing list