My Project
|
#include "search.h"
#include "bit.h"
#include "settings.h"
#include "stats.h"
#include "ybwc.h"
#include <assert.h>
Functions | |
static int | board_solve (const Board *board, const int n_empties) |
Get the final score. More... | |
int | search_solve (const Search *search) |
Get the final score. More... | |
static int | board_solve_0 (const Board *board) |
Get the final score. More... | |
int | search_solve_0 (const Search *search) |
Get the final score. More... | |
int | board_score_1 (const Board *board, const int beta, const int x) |
Get the final score. More... | |
static int | board_solve_2 (Board *board, int alpha, const int x1, const int x2, Search *search) |
Get the final score. More... | |
static int | search_solve_3 (Search *search, const int alpha) |
Get the final score. More... | |
static int | search_solve_4 (Search *search, const int alpha) |
Get the final score. More... | |
static int | search_shallow (Search *search, const int alpha) |
Evaluate a position using a shallow NWS. More... | |
int | NWS_endgame (Search *search, const int alpha) |
Evaluate an endgame position with a Null Window Search algorithm. More... | |
|
inline |
Get the final score.
Get the final score, when 1 empty squares remain. The following code has been adapted from Zebra by Gunnar Anderson.
board | Board to evaluate. |
beta | Beta bound. |
x | Last empty square to play. |
|
inlinestatic |
Get the final score.
Get the final score, when no move can be made.
board | Board. |
n_empties | Number of empty squares remaining on the board. |
|
inlinestatic |
Get the final score.
Get the final score, when the board is full.
board | Board. |
|
static |
Get the final score.
Get the final score, when 2 empty squares remain.
board | The board to evaluate. |
alpha | Alpha bound. |
x1 | First empty square coordinate. |
x2 | Second empty square coordinate. |
search | Search. |
int NWS_endgame | ( | Search * | search, |
const int | alpha | ||
) |
Evaluate an endgame position with a Null Window Search algorithm.
This function is used when there are still many empty squares on the board. Move ordering, hash table cutoff, enhanced transposition cutoff, etc. are used in order to diminish the size of the tree to analyse, but at the expense of a slower speed.
search | Search. |
alpha | Alpha bound. |
|
static |
Evaluate a position using a shallow NWS.
This function is used when there are few empty squares on the board. Here, optimizations are in favour of speed instead of efficiency. Move ordering is constricted to the hole parity and the type of squares. No hashtable are used and anticipated cut-off is limited to stability cut-off.
search | Search. |
alpha | Alpha bound. |
int search_solve | ( | const Search * | search | ) |
Get the final score.
Get the final score, when no move can be made.
search | Search. |
int search_solve_0 | ( | const Search * | search | ) |
Get the final score.
Get the final score, when the board is full.
search | Search. |
|
static |
Get the final score.
Get the final score, when 3 empty squares remain.
search | Search. |
alpha | Alpha bound. |