Files | |
| file | playoff.c |
| Score Four Playoff - source file. | |
Defines | |
| #define | BUF_SIZE 80 |
| Buffer size. | |
| #define | NUM_COEF 3 |
| Number of coefficients. | |
| #define | A_COEF_FILE "a_coeff" |
| Alpha coefficient file. | |
| #define | B_COEF_FILE "b_coeff" |
| Beta coefficient file. | |
Functions | |
| static void | _init (int argc, char *argv[]) |
| Perform intialization for a playoff. | |
| static void | _play (int alpha_first) |
| Play a game between Alpha and Beta. | |
| static int | _t_init (void) |
| Get heuristic information from coefficient files for both versions. | |
| static void | _tournament (void) |
| Play two games - each player gets to go first. | |
| static void | _usage (void) |
| Print usage message for a playoff. | |
Variables | |
| short | a_board_1 [] |
| Alpha board. | |
| short | b_board_1 [] |
| Beta board. | |
| short * | alpha_ptr_1 |
| Alpha board ptr. | |
| short * | beta_ptr_1 |
| Beta board ptr. | |
| int * | coeff_1 |
| Coefficients. | |
| char | mach_ch_1 |
| Machine stone - wither 'O' or 'X'. | |
| char | user_ch_1 |
| User stone - wither 'O' or 'X'. | |
| MOVE | c_move_1 |
| Move chosen by Alpha. | |
| static int | a_coeff [NUM_COEF] |
| Alpha Coefficients. | |
| static int | b_coeff [NUM_COEF] |
| Beta Coefficients. | |
| static int | n_flag |
| Show games but don't play them? | |
| static float | alpha_factor |
| Alpha factor. | |
| static float | beta_factor |
| Beta factor. | |
| static int | alpha_flag |
| Alpha flag. | |
| static int | beta_flag |
| Beta flag. | |
| static int | a_apply_trap |
| Alpha apply trap. | |
| static int | b_apply_trap |
| Beta apply trap. | |
| static int | a_apply_poly |
| Alpha apply polynomial. | |
| static int | b_apply_poly |
| Beta apply polynomial. | |
| static FILE * | a_fd |
| File pointer for b_coeff. | |
| static FILE * | b_fd |
| File pointer for b_coeff. | |
Play two games with Alpha and Beta alternating the first move. Input both Beta's and Alpha's coefficients from different files.
usage: playoff [-n]
-n : show games but don't play them.
|
|
Alpha coefficient file.
|
|
|
Beta coefficient file.
|
|
|
Buffer size.
|
|
|
Number of coefficients.
|
|
||||||||||||
|
Perform intialization for a playoff.
|
|
|
Play a game between Alpha and Beta.
|
|
|
Get heuristic information from coefficient files for both versions.
|
|
|
Play two games - each player gets to go first.
|
|
|
Print usage message for a playoff.
|
|
|
Alpha apply polynomial.
|
|
|
Alpha apply trap.
|
|
|
Alpha board.
|
|
|
Alpha Coefficients.
|
|
|
File pointer for b_coeff.
|
|
|
Alpha factor.
|
|
|
Alpha flag.
|
|
|
Alpha board ptr.
|
|
|
Beta apply polynomial.
|
|
|
Beta apply trap.
|
|
|
Beta board.
|
|
|
Beta Coefficients.
|
|
|
File pointer for b_coeff.
|
|
|
Beta factor.
|
|
|
Beta flag.
|
|
|
Beta board ptr.
|
|
|
Move chosen by Alpha.
|
|
|
Coefficients.
|
|
|
Machine stone - wither 'O' or 'X'.
|
|
|
Show games but don't play them?
|
|
|
User stone - wither 'O' or 'X'.
|
1.4.5