| My Project
    | 
Go to the source code of this file.
| Classes | |
| struct | Eval | 
| evaluation function  More... | |
| Typedefs | |
| typedef struct Eval | Eval | 
| evaluation function  More... | |
| Functions | |
| void | eval_open (const char *) | 
| Load the evaluation function features' weights.  More... | |
| void | eval_close (void) | 
| Free global resources allocated to the evaluation function.  More... | |
| void | eval_init (Eval *) | 
| Initialize a new evaluation function.  More... | |
| void | eval_free (Eval *) | 
| Free resources used by the evaluation function.  More... | |
| void | eval_set (Eval *, const struct Board *) | 
| void | eval_update (Eval *, const struct Move *) | 
| void | eval_restore (Eval *, const struct Move *) | 
| void | eval_pass (Eval *) | 
| Update/Restore the features after a passing move.  More... | |
| double | eval_sigma (const int, const int, const int) | 
| Compute the error-type of the evaluation function according to the depths.  More... | |
| Variables | |
| short *** | EVAL_WEIGHT | 
Evaluation function's header.
| void eval_close | ( | void | ) | 
Free global resources allocated to the evaluation function.
| void eval_free | ( | Eval * | eval | ) | 
Free resources used by the evaluation function.
| eval | Evaluation function. | 
| void eval_init | ( | Eval * | eval | ) | 
Initialize a new evaluation function.
Allocate space to store the state of the evaluation function.
| eval | Evaluation function. | 
| void eval_open | ( | const char * | file | ) | 
Load the evaluation function features' weights.
The weights are stored in a global variable, because, once loaded from the file, they stay constant during the lifetime of the program. As loading the weights is time & resource consuming, a counter variable check that the weights are effectively loaded only once.
| file | File name of the evaluation function data. | 
| void eval_pass | ( | Eval * | eval | ) | 
Update/Restore the features after a passing move.
| eval | Evaluation function. | 
| double eval_sigma | ( | const int | n_empty, | 
| const int | depth, | ||
| const int | probcut_depth | ||
| ) | 
Compute the error-type of the evaluation function according to the depths.
A statistical study showed that the accuracy of the alphabeta mostly depends on the depth & the ply of the game. This function is useful to the probcut algorithm. Using a function instead of a table of data makes easier to inter- or extrapolate new values.
| n_empty | Number of empty squares on the board. | 
| depth | Depth used in alphabeta. | 
| probcut_depth | A shallow depth used in probcut algorithm. | 
| 
 | extern | 
eval weights