#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <ctype.h>
#include <fcntl.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "aggression.h"
#include "alpha_beta.h"
#include "assert.h"
#include "heuristic.h"
#include "makemove.h"
#include "score4.h"
#include "win.h"
#include "win_table.h"
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. | |
| int | main (int argc, char *argv[]) |
Variables | |
| short | a_board_1 [NUM_PLAINS] |
| Alpha board. | |
| short | b_board_1 [NUM_PLAINS] |
| 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. | |
|
||||||||||||
|
|
1.4.5