This puzzle is an intermediate to advanced puzzle.  It isn't long, but it takes a lot of thought.  Stephen French was the first to solve it in the Oracle Community.  Kudos.

 

 

Puzzle solving requirement:  OPA must solve the puzzle immediately when debug is pressed.  When Debug is hit, using rules, OPA must decide the correct solution.  In other words, OPA must be fed conditions to come up with the correct solution, OPA cannot be directly fed a single correct answer, except of course feeding OPA data and rules based on the puzzle itself.  [We know the names of the three contestants, so it is o.k. to provide OPA those names.]

 

How would you write rules to have OPA solve the following puzzle immediately when Debug is pressed:

 

Isaac and Albert were excitedly describing the result of the Third Annual International Science Fair Extravaganza in Sweden. There were three contestants, Louis, Rene, and Johannes. Isaac reported that Louis won the fair, while Rene came in second. Albert, on the other hand, reported that Johannes won the fair, while Louis came in second.

 

In fact, neither Isaac nor Albert had given a correct report of the results of the science fair. Each of them had given one correct statement and one false statement. What was the actual placing of the three contestants?

 

Care to try using rules in OPA to determine the correct placing of the three contestants?

 

A project with the solution is attached.

 

The OPA debug screen should look similar to this for a solution: