Learning the game of hearts
FOO (First Operational Operationaliser) tries to convert high level advice (principles, problems, methods) into effective executable (LISP) procedures.
Hearts is a game of partial information with no known algorithm for winning.
Although the possible situations are numerous general advice can be given such as:
In order to receive advice a human must convert into a FOO representation (LISP clause)
(avoid (take-points me) (trick))
FOO operationalises the advice by translating it into expressions it can use in the game. It can UNFOLD avoid and then trick to give:
(achieve (not (during (scenario (each p1 (players) (play-card p1)) (take-trick (trick-winner))) (take-points me))))
However the advice is still not operational since it depends on the
outcome of trick which is generally not known. Therefore FOO uses case
analysis (on the
during expression) to determine which steps could
case one to take points. Step 1 is ruled out and step 2's
(achieve (not (exists c1 (cards-played) (exists c2 (point-cards) (during (take (trick-winner) c1) (take me c2))))))
FOO now has to decide: Under what conditions does
(take me c2) occur
(take (trick-winner) c1).
A technique, called partial matching, hypothesises that points will be
me = trick-winner and
c2 = c1. We can reduce our
(achieve (not (and (have-points(card-played)) (= (trick-winner) me ))))
This not quite enough a this means Do not win trick that has points.
We do not know who the
trick-winner is, also we have not said anything
about how to play in a trick that has point led in the suit. After a few more
steps to achieve this FOO comes up with:
(achieve (>= (and (in-suit-led(card-of me)) (possible (trick-has-points))) (low(card-of me)))
FOO had an initial knowledge base that was made up of:
FOO has 2 basic shortcomings: