This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

ab.c File Reference

#include "game.h"
#include "move.h"
#include "engine.h"
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>

Go to the source code of this file.

Functions

int hash_get_eval (byte *, int, int, int, float *)
void hash_print_stats ()
void hash_insert (byte *, int, int, int, float, byte *move)
void hash_clear ()
void hash_insert_move (byte *, int, int, byte *)
byte* hash_get_move (byte *, int, int)
float ab_with_tt (Pos *pos, int player, int level, float alpha, float beta, byte *best_movep)
float ab_with_tt_incr (Pos *pos, int player, int level, float eval, float alpha, float beta, byte *best_movep)
void catch_USR1 (int sig)
byte* ab_dfid (Pos *pos, int player)
 Alpha-beta search function (using depth first iterative deepening).


Variables

int time_per_move = 5000
 Max time per move. alpha-beta will often return earlier than this.

gboolean engine_stop_search = FALSE
 If an event occurs when we are thinking this will be set to TRUE so that we will know to stop thinking.

gboolean ab_tree_exhausted = FALSE
int ab_leaf_cnt
gboolean opt_verbose
gboolean game_use_hash = TRUE


Function Documentation

byte * ab_dfid ( Pos * pos,
int player )
 

Alpha-beta search function (using depth first iterative deepening).

Definition at line 284 of file ab.c.

float ab_with_tt ( Pos * pos,
int player,
int level,
float alpha,
float beta,
byte * best_movep )
 

Definition at line 51 of file ab.c.

Referenced by ab_dfid().

float ab_with_tt_incr ( Pos * pos,
int player,
int level,
float eval,
float alpha,
float beta,
byte * best_movep )
 

Definition at line 174 of file ab.c.

void catch_USR1 ( int sig ) [static]
 

Definition at line 278 of file ab.c.

void hash_clear ( )
 

Definition at line 212 of file hash.c.

Referenced by ab_dfid().

int hash_get_eval ( byte * pos,
int poslen,
int num_moves,
int depth,
float * evalp )
 

Definition at line 161 of file hash.c.

byte* hash_get_move ( byte * pos,
int poslen,
int num_moves )
 

Definition at line 190 of file hash.c.

void hash_insert ( byte * pos,
int poslen,
int num_moves,
int depth,
float eval,
byte * move )
 

Definition at line 126 of file hash.c.

void hash_insert_move ( byte *,
int,
int,
byte * )
 

void hash_print_stats ( )
 

Definition at line 224 of file hash.c.

Referenced by ab_dfid().


Variable Documentation

int ab_leaf_cnt [static]
 

Definition at line 36 of file ab.c.

gboolean ab_tree_exhausted = FALSE [static]
 

Definition at line 34 of file ab.c.

gboolean engine_stop_search = FALSE
 

If an event occurs when we are thinking this will be set to TRUE so that we will know to stop thinking.

Definition at line 64 of file engine.c.

gboolean game_use_hash = TRUE
 

Definition at line 48 of file ab.c.

gboolean opt_verbose
 

Definition at line 45 of file ab.c.

int time_per_move = 5000
 

Max time per move. alpha-beta will often return earlier than this.

Definition at line 70 of file engine.c.