Score Four Tournament (Version A)

Play a Score Four Tournament (Version A). More...


Files

file  tournament_A.c
 Play a Score Four Tournament (Version A).

Defines

#define FACTOR   .05
 Factor.
#define GAMES_IN_SET   4
 Number of games in a set.

Functions

static int _learn (void)
 Play a Score Four Tournament, that is, 4 games for each coefficient, for a total of 12 games.
void tournament_A (void)
 Play a Score Four Tournament (Version A).

Detailed Description

Play a Score Four Tournament (Version A).

The object of this program is to learn from experience. That is, adjust the term coefficients through experience. This is done as follows. The program plays a number of tournaments. Each tournament consists of 12 games. Alpha and Beta have seperate coefficients for each game. For the first two games in a tournament, Beta is assigned Alpha's coeffcients, except that the first coefficient is multiplied by .95. For the next two games in the tournament, Beta is assigned Alpha's coefficients, except that the first coefficient is multiplied by 1.05. Alpha and Beta then take turns going first. If Alpha does not lose the first two games and Beta does not lose the last two games, then Alpha's first coefficient is multiplied by 1.05. And if Alpha does not lose the last two games and Beta does not lose the first two games, then Alpha's first coefficient is multiplied by .95. By lose, I mean, wins both games or wins one game and the other game results in a draw.

This process is repeated for all three coefficients, which gives (4 x 3) or 12 games for a tournament. If a coefficient is changed during a tournament, then another tournament is played. This process is terminated when a tournament does not result in a change in at least one of Alpha's coefficients or when PLAYOFF_LEN number of tournaments have been played.


Define Documentation

#define FACTOR   .05
 

Factor.

#define GAMES_IN_SET   4
 

Number of games in a set.


Function Documentation

static int _learn void   )  [static]
 

Play a Score Four Tournament, that is, 4 games for each coefficient, for a total of 12 games.

Returns:
int.
Return values:
TRUE - a coefficent was changed - continue with the next tournament.
FALSE - a coefficent was not changed - stop playing the tournament.

tournament_A void   ) 
 

Play a Score Four Tournament (Version A).

Returns:
void.


Generated on Sat Sep 24 09:00:12 2011 for ScoreFour by  doxygen 1.4.5