My Project
|
Edax play control - header file. More...
Go to the source code of this file.
Classes | |
struct | Play |
Macros | |
#define | PLAY_MESSAGE_MAX_LENGTH 4096 |
Typedefs | |
typedef struct Play | Play |
Functions | |
bool | play_is_game_over (Play *) |
Check if game is over. More... | |
bool | play_must_pass (Play *play) |
Check if player must pass. More... | |
void | play_init (Play *, Book *) |
Initialization. More... | |
void | play_free (Play *) |
Free resources. More... | |
void | play_new (Play *) |
Start a new game. More... | |
void | play_ggs_init (Play *, const char *) |
bool | play_load (Play *, const char *) |
Load a saved game. More... | |
void | play_save (Play *, const char *) |
Save a played game. More... | |
void | play_auto_save (Play *) |
void | play_go (Play *, const bool) |
Start thinking. More... | |
void | play_hint (Play *, int) |
Start thinking. More... | |
void | play_hint_for_lib (Play *, int, HintList *) |
hint for libEdax More... | |
void | play_get_bookmove (Play *, MoveList *) |
get book move for libEdax More... | |
int | play_get_bookmove_with_position (Play *, MoveList *, Position *) |
get book move for libEdax More... | |
void | play_hint_prepare (Play *, MoveList *) |
prepare hint for libEdax More... | |
void | play_hint_next (Play *, Hint *, const bool) |
get next hint More... | |
void | play_stop (Play *) |
Stop thinking. More... | |
void * | play_ponder_run (void *) |
do ponderation. More... | |
void | play_ponder (Play *) |
Ponder. More... | |
void * | play_ponder_loop (void *) |
void | play_stop_pondering (Play *) |
Stop pondering. More... | |
void | play_update (Play *, Move *) |
Update the game. More... | |
void | play_pass (Play *) |
void | play_undo (Play *) |
Undo a move. More... | |
void | play_redo (Play *) |
Redo a move. More... | |
void | play_set_board (Play *, const char *) |
Set a new board. More... | |
void | play_set_board_from_FEN (Play *, const char *) |
Set a new board. More... | |
void | play_set_board_from_obj (Play *, const Board *, const int) |
Set a new board. More... | |
void | play_game (Play *, const char *) |
Play a move sequence. More... | |
bool | play_move (Play *, int) |
Play a move. More... | |
bool | play_user_move (Play *, const char *) |
Play a user move. More... | |
Move * | play_get_last_move (Play *) |
Get the last played move. More... | |
void | play_analyze (Play *, int) |
Analyze a played game. More... | |
void | play_book_analyze (Play *, int) |
Analyze a played game. More... | |
void | play_learn (Play *) |
void | play_store (Play *) |
store the game into the opening book More... | |
void | play_adjust_time (Play *, const int, const int) |
adjust time. More... | |
void | play_print (Play *, FILE *) |
Print the game state. More... | |
void | play_force_init (Play *, const char *) |
Initialize a forced line. More... | |
void | play_force_update (Play *) |
Update a forced line. More... | |
void | play_force_restore (Play *) |
Restore a forced line. More... | |
bool | play_force_go (Play *, Move *) |
Play a forced move. More... | |
void | play_symetry (Play *, const int) |
Get the symetry of the actual position. More... | |
const char * | play_show_opening_name (Play *, const char *(*opening_get_name)(const Board *)) |
Print the opening name. More... | |
Edax play control - header file.
#define PLAY_MESSAGE_MAX_LENGTH 4096 |
error message max length
void play_adjust_time | ( | Play * | play, |
const int | left, | ||
const int | extra | ||
) |
adjust time.
Set remaining time to play from a server (GGS) or a GUI (Quarry, ...).
play | Play. |
left | Time left. |
extra | Extra time. |
void play_analyze | ( | Play * | play, |
int | n | ||
) |
Analyze a played game.
play | Play. |
n | number of moves to analyze. |
void play_auto_save | ( | Play * | ) |
void play_book_analyze | ( | Play * | play, |
int | n | ||
) |
Analyze a played game.
play | Play. |
n | number of moves to analyze. |
void play_force_init | ( | Play * | play, |
const char * | string | ||
) |
Initialize a forced line.
play | Play. |
string | A string with a sequence of moves. |
void play_force_restore | ( | Play * | play | ) |
Restore a forced line.
Check if the actual board is in the forced line, and restore the forced line accordingly.
play | Play. |
void play_force_update | ( | Play * | play | ) |
Update a forced line.
Check if the actual board is in the forced line, and update the forced line accordingly.
play | Play. |
void play_game | ( | Play * | play, |
const char * | string | ||
) |
get book move for libEdax
play | Play |
book_moves | result(out parameter) |
get book move for libEdax
play | Play |
book_moves | result(out parameter) |
position | position(out parameter) |
void play_ggs_init | ( | Play * | , |
const char * | |||
) |
void play_go | ( | Play * | play, |
const bool | update | ||
) |
Start thinking.
play | Play. |
update | Flag to tell if edax should update or no its game. |
void play_hint | ( | Play * | play, |
int | n | ||
) |
Start thinking.
Evaluate first best moves of the position.
play | Play. |
n | Number of (best) moves to evaluate. |
hint for libEdax
Evaluate first best moves of the position.
play | Play. |
n | Number of (best) moves to evaluate. |
hintlist | result (out parameter) |
get next hint
Evaluate first best moves of the position among rest moves.
play | Play. |
hint | result (out parameter) |
prepare hint for libEdax
play | Play. |
bool play_is_game_over | ( | Play * | play | ) |
void play_learn | ( | Play * | ) |
bool play_load | ( | Play * | play, |
const char * | file | ||
) |
Load a saved game.
play | Play. |
file | File name of the game. |
bool play_move | ( | Play * | play, |
int | x | ||
) |
bool play_must_pass | ( | Play * | play | ) |
void play_pass | ( | Play * | ) |
void play_ponder | ( | Play * | play | ) |
Ponder.
Think during opponent time. Activate the thread suspended in play_ponder_loop.
play | Play. |
void * play_ponder_loop | ( | void * | ) |
void * play_ponder_run | ( | void * | v | ) |
do ponderation.
Ponderation (thinking during opponent time) is done within a thread. The thread is launched at startup and immediately suspended, thanks to condition_wait. When edax is required to ponder, the thread is activated by a condition_signal, and the search start. To stop the ponderation, just stop the search and wait for the lock to be release.
v | the play. |
void play_print | ( | Play * | play, |
FILE * | f | ||
) |
Print the game state.
Print the game state: board, time, played move, etc.
play | Play. |
f | Output stream. |
void play_save | ( | Play * | play, |
const char * | file | ||
) |
Save a played game.
play | Play. |
file | File name of the game. |
void play_set_board | ( | Play * | play, |
const char * | board | ||
) |
Set a new board.
play | Play. |
board | A new board. |
void play_set_board_from_FEN | ( | Play * | play, |
const char * | board | ||
) |
Set a new board.
play | Play. |
board | A new board. |
const char * play_show_opening_name | ( | Play * | play, |
const char *(*)(const Board *) | opening_get_name | ||
) |
Print the opening name.
void play_stop_pondering | ( | Play * | play | ) |
Stop pondering.
If edax is pondering, stop the search, and wait that the pondering thread is suspended.
play | Play. |
void play_symetry | ( | Play * | play, |
const int | sym | ||
) |
Get the symetry of the actual position.
play | Play. |
sym | Symetry. |