Score Four playoff utility.

Score Four Playoff. More...


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.

Detailed Description

Score Four Playoff.

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.


Define Documentation

#define A_COEF_FILE   "a_coeff"
 

Alpha coefficient file.

#define B_COEF_FILE   "b_coeff"
 

Beta coefficient file.

#define BUF_SIZE   80
 

Buffer size.

#define NUM_COEF   3
 

Number of coefficients.


Function Documentation

static void _init int  argc,
char *  argv[]
[static]
 

Perform intialization for a playoff.

Returns:
void.

static void _play int  alpha_first  )  [static]
 

Play a game between Alpha and Beta.

Parameters:
alpha_first int : flag - does Alpha go first?
Returns:
void.

static int _t_init void   )  [static]
 

Get heuristic information from coefficient files for both versions.

Returns:
int.
Return values:
TRUE - if we should play another tournament.
FALSE - if we should not play another tournament and thus end game.

static void _tournament void   )  [static]
 

Play two games - each player gets to go first.

Returns:
void.

static void _usage void   )  [static]
 

Print usage message for a playoff.

Returns:
void.


Variable Documentation

a_apply_poly [static]
 

Alpha apply polynomial.

a_apply_trap [static]
 

Alpha apply trap.

a_board_1
 

Alpha board.

a_coeff [static]
 

Alpha Coefficients.

a_fd [static]
 

File pointer for b_coeff.

alpha_factor [static]
 

Alpha factor.

alpha_flag [static]
 

Alpha flag.

alpha_ptr_1
 

Alpha board ptr.

b_apply_poly [static]
 

Beta apply polynomial.

b_apply_trap [static]
 

Beta apply trap.

b_board_1
 

Beta board.

b_coeff [static]
 

Beta Coefficients.

b_fd [static]
 

File pointer for b_coeff.

beta_factor [static]
 

Beta factor.

beta_flag [static]
 

Beta flag.

beta_ptr_1
 

Beta board ptr.

c_move_1
 

Move chosen by Alpha.

coeff_1
 

Coefficients.

mach_ch_1
 

Machine stone - wither 'O' or 'X'.

n_flag [static]
 

Show games but don't play them?

user_ch_1
 

User stone - wither 'O' or 'X'.


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