Files | |
| file | tournament_B.c |
| Play a Score Four Tournament (Version B). | |
Defines | |
| #define | FACTOR .05 |
| Factor. | |
| #define | F_START .05 |
| Start factor. | |
| #define | F_END .05 |
| End factor. | |
| #define | GAMES_IN_SET 4 |
| Number of games in a set. | |
| #define | TOURNAMENTS 20 |
| Number of tournaments. | |
Functions | |
| static int | _learn (float factor) |
| Play a Score Four Tournament, that is, 2 games for each coefficient, for a total of 6 games. | |
| void | tournament_B (void) |
| Play a Score Four Tournament (Version B). | |
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 6 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 a factor. Alpha and Beta then take turns going first. If Alpha does not win at least one of the two games, then Beta's coefficients are assigned to Alpha. For the next two games in a tournament, Beta is assigned Alpha's coeffcients, except that the second coefficient is multiplied by a factor. And for the last two games in a tournament, Beta is assigned Alpha's coeffcients, except that the third coefficient is multiplied by a factor.
Each tournament differs by the value of the factor that is used. For the first tournament, a factor of .95 is used. The factor is then decreased by .05 for each succeeding tournamanet until the factor equals 0. During this period, if Alpha is assigned a new set of coefficients, then the factor is reset to .95. This process is terminated when either the factor equals zero or TOURNAMENTS number of tournaments have been played.
|
|
End factor.
|
|
|
Start factor.
|
|
|
Factor.
|
|
|
Number of games in a set.
|
|
|
Number of tournaments.
|
|
|
Play a Score Four Tournament, that is, 2 games for each coefficient, for a total of 6 games.
|
|
|
Play a Score Four Tournament (Version B).
|
1.4.5