Information Technology Reference
In-Depth Information
Fig. 2. Two states of Tic-Tac-Toe. The first row is still open in state s 1 but blocked in state s 2 .
In state s 2 the first row contains two x s and one cell marked with an o . State s 1 has a
higher state value than s 2 for xplayer since in s 1 xplayer has a threat of completing
a line in contrast to s 2 . The corresponding goal condition for xplayer completing the
first row is:
1 line(x) :- true (cell(1,1,x)),
2
true (cell(2,1,x)), true (cell(3,1,x)).
When evaluating the body of this condition using the above fuzzy evaluation, we see
that it cannot distinguish between s 1 and s 2 because both have two markers in place
and one missing for completing the line for xplayer , resulting in an evaluation R =
1
0 . 1=0 . 1
However, the distance-based function evaluates true (cell(3,1,b)) of s 1 to 0 . 1
and true (cell(3,1,o)) of s 2 to 0 . Therefore, it can distinguish between both states,
returning R =0 . 1 for S = s 1 and R =0 for S = s 2 .
1
5.3
Breakthrough
The second game is Breakthrough, again a two-player game played on a chessboard.
Like in chess, the first two ranks contain only white pieces and the last two only black
pieces. The pieces of the game are only pawns that move and capture in the same way
as pawns in chess, but without the initial double advance. Whoever reaches the opposite
side of the board first wins. 2 Figure 3 shows the initial position for Breakthrough. The
arrows indicate the possible moves, a pawn can make.
The goal condition for the player black states that black wins if there is a cell with
the coordinates X,1 and the content black , such that X is an index (a number from 1 to
8 according to the rules of index ):
1 goal (black, 100) :- index(X), true (cellholds(X, 1, black)).
Grounding this rule yields
1 goal (black, 100) :- true (cellholds(1, 1, black) ;
2
...; true (cellholds(8, 1, black)).
We omitted the index predicate since it is true for all 8 ground instances.
2
The complete rules for Breakthrough as well as Tic-Tac-Toe can be found under
http://ggpserver.general-game-playing.de/
Search WWH ::




Custom Search