Hi David. Here is a Jess solution to Einstein's Riddle as presented in your E-mail. The approach to this problem and the implementation is taken directly from the zebra.clp example supplied by the Jess distribution (which is taken, in turn, directly from the Giarratano and Riley's "Expert Systems: Principles and Programming").
Regards, Win Carus > Dear Jessers, > > I am a newbie to Jess. I would like to solve the following riddle using > Jess. I have previously tried to use Prolog to solve it but my attempts > were futile. > Anyone has any idea how to approach it ? > > Who owns the fish? This is the question that Einstein posed last century > when he stated that 98% of the population would be unable to solve it. > Find out if you are one of the 2% who can... > There are 5 houses in 5 different colors. > In each house lives a person with a different nationality. > These 5 owners drink a certain drink, smoke a certain brand of cigar, > and keep a certain pet. > No owners have the same pet, smoke the same brand of cigar or drink the > same drink. > The question is -- WHO OWNS THE FISH? > > > HINTS: > - the Brit lives in the red house > - the Swede keeps dogs as pets > - the Dane drinks tea > - the green house is on the left of the white house > - the green house owner drinks coffee > - the person who smokes Pall Mall rears birds > - the owner of the yellow house smokes Dunhill > - the man living in the house right in the center drinks milk > - the Norwegian lives in the first house > - the man who smokes blends lives next to the one who keeps cats > - the man who keeps horses lives next to the one who smokes Dunhill > - the owner who smokes Bluemaster drinks beer > - the German smokes prince > - the Norwegian lives next to the blue house > - the man who smokes blends has a neighbor who drinks water. > <http://www.tektron.co.uk/riddlesolution.html> Einstein > > ======================================================================== > ======================================== > > >
einstein.clp
Description: Binary data
