|
My Project
|
#include "bit.h"#include "const.h"#include "game.h"#include "move.h"#include "opening.h"#include "options.h"#include "play.h"#include "settings.h"#include <assert.h>Go to the source code of this file.
Functions | |
| void | play_init (Play *play, Book *book) |
| Initialization. | |
| void | play_free (Play *play) |
| Free resources. | |
| void | play_new (Play *play) |
| Start a new game. | |
| bool | play_load (Play *play, const char *file) |
| Load a saved game. | |
| void | play_save (Play *play, const char *file) |
| Save a played game. | |
| void | play_update (Play *play, Move *move) |
| Update the game. | |
| bool | play_is_game_over (Play *play) |
| Check if game is over. | |
| bool | play_must_pass (Play *play) |
| Check if player must pass. | |
| void | play_go (Play *play, const bool update) |
| Start thinking. | |
| void | play_hint (Play *play, int n) |
| Start thinking. | |
| void | play_hint_for_lib (Play *play, int n, HintList *hintlist) |
| hint for libEdax | |
| void | play_get_bookmove (Play *play, MoveList *book_moves) |
| get book move for libEdax | |
| int | play_get_bookmove_with_position (Play *play, MoveList *book_moves, Position *position) |
| get book move for libEdax | |
| void | play_hint_prepare (Play *play, MoveList *exclude_list) |
| prepare hint for libEdax | |
| void | play_hint_next (Play *play, Hint *hint, bool multiPvDepthMax) |
| get next hint | |
| void * | play_ponder_run (void *v) |
| do ponderation. | |
| void | play_ponder (Play *play) |
| Ponder. | |
| void | play_stop_pondering (Play *play) |
| Stop pondering. | |
| void | play_stop (Play *play) |
| Stop thinking. | |
| void | play_undo (Play *play) |
| Undo a move. | |
| void | play_redo (Play *play) |
| Redo a move. | |
| void | play_set_board (Play *play, const char *board) |
| Set a new board. | |
| void | play_set_board_from_FEN (Play *play, const char *board) |
| Set a new board. | |
| void | play_set_board_from_obj (Play *play, const Board *board, const int turn) |
| Set a new board. | |
| void | play_game (Play *play, const char *string) |
| Play a move sequence. | |
| bool | play_move (Play *play, int x) |
| Play a move. | |
| bool | play_user_move (Play *play, const char *string) |
| Play a user move. | |
| Move * | play_get_last_move (Play *play) |
| Get the last played move. | |
| static int | play_alternative (Play *play, Move *played, Move *alternative, int *depth, int *percent) |
| Seek for the best alternative move. | |
| static void | play_write_analysis (Play *play, const Move *m, const Move *a, const int n_moves, const int depth, const int percent, FILE *f) |
| Write a line if an analysis. | |
| void | play_analyze (Play *play, int n) |
| Analyze a played game. | |
| static int | play_book_alternative (Play *play, Move *played, Move *alternative) |
| Seek for the best alternative move from the opening book. | |
| void | play_book_analyze (Play *play, int n) |
| Analyze a played game. | |
| void | play_store (Play *play) |
| store the game into the opening book | |
| void | play_adjust_time (Play *play, const int left, const int extra) |
| adjust time. | |
| void | play_print (Play *play, FILE *f) |
| Print the game state. | |
| void | play_force_init (Play *play, const char *string) |
| Initialize a forced line. | |
| void | play_force_update (Play *play) |
| Update a forced line. | |
| void | play_force_restore (Play *play) |
| Restore a forced line. | |
| bool | play_force_go (Play *play, Move *move) |
| Play a forced move. | |
| void | play_symetry (Play *play, const int sym) |
| Get the symetry of the actual position. | |
| const char * | play_show_opening_name (Play *play, const char *(*opening_get_name)(const Board *)) |
| Print the opening name. | |
Edax play control.
| 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. |
|
static |
Seek for the best alternative move.
| play | Play. |
| played | Last played move. |
| alternative | Second best move. |
| depth | Depth searched. |
| percent | Probcut selectivity searched. |
| void play_analyze | ( | Play * | play, |
| int | n ) |
Analyze a played game.
| play | Play. |
| n | number of moves to analyze. |
Seek for the best alternative move from the opening book.
| play | Play. |
| played | Last played move. |
| alternative | Second best move. |
| 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_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 | ) |
| 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_ponder | ( | Play * | play | ) |
Ponder.
Think during opponent time. Activate the thread suspended in play_ponder_loop.
| play | Play. |
| 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 *(* | opening_get_name )(const Board *) ) |
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. |
| bool play_user_move | ( | Play * | play, |
| const char * | string ) |