In our case-study we assume as world the tic-tac-toe game (cf.
figure 3.38). The world consists of
many cells with the
special coordinate system
marking the left-upper cell with the
from top to down and the
from left to right.
-->W3=['_' '_' '_'; '_' '_' '_'; '_' '_' '_'] W3 = !_ _ _ ! ! ! !_ _ _ ! ! ! !_ _ _ !
For the case study we assume a simple game environment where in the general case n-many players
are competing with each other to win a tournament with the game tic-tac-toe. In a tournament each player plays
against each other at least once, often twice. Therefore one needs a list of
all players
and a tournament matrix
showing each pairing with the outcome '0' for no win and '+1' for a win. The upper-left corner can be used for a counter for the total number of games for each player (assuming that all players have the same number).
Example with a Plist for n=8 players.
-->[PList]=plistgen(8) PList = 1. 2. 3. 4. 5. 6. 7. 8. -->[PMatrix]=pmatrixgen(PList) PMatrix = 0. 1. 2. 3. 4. 5. 6. 7. 8. 1. 0. 0. 0. 0. 0. 0. 0. 0. 2. 0. 0. 0. 0. 0. 0. 0. 0. 3. 0. 0. 0. 0. 0. 0. 0. 0. 4. 0. 0. 0. 0. 0. 0. 0. 0. 5. 0. 0. 0. 0. 0. 0. 0. 0. 6. 0. 0. 0. 0. 0. 0. 0. 0. 7. 0. 0. 0. 0. 0. 0. 0. 0. 8. 0. 0. 0. 0. 0. 0. 0. 0.
The left row shows always the player which begins and who uses the piece 'X' and the numbers of players in the top row represent the opponents which react to the beginners and these use the piece 'O' in the game.
A complete game is a finite sequence of minimal 5 and maximal 9 turns.
At the begin of every turn - as long as the game is not ended - the
beginner places his piece 'X' in an empty cell on the board.
If the game didn't end by the move of the beginner the opponent will
respond with his move by placing his piece 'O' in a free cell on the board.
Thus we have an action like
where
represent the
cell coordinate and
the piece to be inserted.
In the following we are using only two players, either two random players as benchmark or one random player as beginner 'X' and one classifier system as opponent 'O'.