Example with Tic Tac Toe Game

In our case-study we assume as world $ W$ the tic-tac-toe game (cf. figure 3.38). The world consists of $ 3 \times 3$ many cells with the special coordinate system $ (1,1)$ marking the left-upper cell with the $ y-axis$ from top to down and the $ x-axis$ from left to right.

-->W3=['_' '_' '_'; '_' '_' '_'; '_' '_' '_']
 W3  =
 
!_  _  _  !
!         !
!_  _  _  !
!         !
!_  _  _  !

For the case study we assume a simple game environment where in the general case n-many players $ P_{1}, P_{2}, ..., P_{n}$ 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 $ PList$ and a tournament matrix $ PMatrix$ 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 $ \langle X,Y,O\rangle$ where $ X,Y$ represent the cell coordinate and $ O \in \{'X', 'O'\}$ 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'.



Subsections
Gerd Doeben-Henisch 2012-03-31