| 
    My Project
    
   | 
 
User interface header. More...
#include "board.h"#include "book.h"#include "event.h"#include "search.h"#include "move.h"#include "play.h"Go to the source code of this file.
Classes | |
| struct | UI | 
| struct | BenchResult | 
Macros | |
| #define | DLL_API | 
Typedefs | |
| typedef struct UI | UI | 
| typedef struct BenchResult | BenchResult | 
Functions | |
| bool | ui_switch (UI *, const char *) | 
| Switch between different User Interface.  More... | |
| void | ui_event_init (UI *) | 
| Create a new Othello User Interface.  More... | |
| bool | ui_event_peek (UI *, char **, char **) | 
| Wait input.  More... | |
| void | ui_event_wait (UI *, char **, char **) | 
| Wait input.  More... | |
| bool | ui_event_exist (UI *) | 
| ui_event_exist  More... | |
| void | ui_event_free (UI *) | 
| Free events.  More... | |
| void | ui_init_edax (UI *) | 
| initialize edax protocol.  More... | |
| void | ui_loop_edax (UI *) | 
| Loop event.  More... | |
| void | ui_free_edax (UI *) | 
| free resources used by edax protocol.  More... | |
| void | ui_init_gtp (UI *) | 
| initialize edax protocol  More... | |
| void | ui_loop_gtp (UI *) | 
| Loop event.  More... | |
| void | ui_free_gtp (UI *) | 
| free resources used by edax protocol  More... | |
| void | ui_init_nboard (UI *) | 
| initialize edax protocol  More... | |
| void | ui_loop_nboard (UI *) | 
| Loop event.  More... | |
| void | ui_free_nboard (UI *) | 
| free resources used by edax protocol  More... | |
| void | ui_init_xboard (UI *) | 
| initialize xboard protocol.  More... | |
| void | ui_loop_xboard (UI *) | 
| Loop event.  More... | |
| void | ui_free_xboard (UI *) | 
| free resources used by xboard protocol.  More... | |
| void | ui_init_ggs (UI *) | 
| ui_init_ggs  More... | |
| void | ui_loop_ggs (UI *) | 
| ui_loop_ggs  More... | |
| void | ui_free_ggs (UI *) | 
| ui_free_ggs  More... | |
| void | ui_init_cassio (UI *) | 
| void | ui_loop_cassio (UI *) | 
| void | ui_free_cassio (UI *) | 
| void | ui_book_init (UI *) | 
| DLL_API void | libedax_initialize (int, char **) | 
| edax init function for library use.  More... | |
| DLL_API void | libedax_terminate (void) | 
| edax terminate function for library use.  More... | |
| DLL_API void | edax_init (void) | 
| init command.  More... | |
| DLL_API void | edax_new (void) | 
| new command.  More... | |
| DLL_API void | edax_load (const char *) | 
| load command.  More... | |
| DLL_API void | edax_save (const char *) | 
| save command.  More... | |
| DLL_API void | edax_undo (void) | 
| undo command.  More... | |
| DLL_API void | edax_redo (void) | 
| redo command.  More... | |
| DLL_API void | edax_mode (const int) | 
| mode command.  More... | |
| DLL_API void | edax_setboard (const char *) | 
| setboard command.  More... | |
| DLL_API void | edax_setboard_from_obj (const Board *, const int) | 
| setboard command with board object.  More... | |
| DLL_API void | edax_vmirror (void) | 
| vmirror command.  More... | |
| DLL_API void | edax_hmirror (void) | 
| hmirror command.  More... | |
| DLL_API void | edax_rotate (const int) | 
| rotate command.  More... | |
| DLL_API void | edax_symetry (const int) | 
| symetry command.  More... | |
| DLL_API void | edax_play (char *) | 
| play command.  More... | |
| DLL_API void | edax_force (char *) | 
| force command.  More... | |
| DLL_API void | edax_bench (BenchResult *, int) | 
| bench (a serie of low level tests). command.  More... | |
| DLL_API void | edax_bench_get_result (BenchResult *) | 
| DLL_API void | edax_go (void) | 
| go command.  More... | |
| DLL_API void | edax_hint (const int, HintList *) | 
| hint command.  More... | |
| DLL_API void | edax_get_bookmove (MoveList *) | 
| get book moves.  More... | |
| DLL_API int | edax_get_bookmove_with_position (MoveList *, Position *) | 
| get book moves.  More... | |
| DLL_API int | edax_get_bookmove_with_position_by_moves (const char *, MoveList *, Position *) | 
| get book moves.  More... | |
| DLL_API void | edax_hint_prepare (MoveList *) | 
| hint command. Call edax_hint_next after calling this function.  More... | |
| DLL_API void | edax_hint_next (Hint *) | 
| hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function.  More... | |
| DLL_API void | edax_hint_next_no_multipv_depth (Hint *) | 
| hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function. This command is for analyze use.  More... | |
| DLL_API void | edax_stop (void) | 
| stop command.  More... | |
| DLL_API void | edax_version (void) | 
| version command.  More... | |
| DLL_API int | edax_move (const char *) | 
| user move command.  More... | |
| DLL_API void | edax_options_dump (void) | 
| dump options.  More... | |
| DLL_API const char * | edax_opening (void) | 
| opening command.  More... | |
| DLL_API const char * | edax_ouverture (void) | 
| ouverture command.  More... | |
| DLL_API void | edax_book_store (void) | 
| book store command.  More... | |
| DLL_API void | edax_book_on (void) | 
| book on command.  More... | |
| DLL_API void | edax_book_off (void) | 
| book off command.  More... | |
| DLL_API void | edax_book_randomness (const int) | 
| book randomness command.  More... | |
| DLL_API void | edax_book_depth (const int) | 
| book depth command.  More... | |
| DLL_API void | edax_book_new (const int, const int) | 
| book new command.  More... | |
| DLL_API void | edax_book_load (const char *) | 
| book load command.  More... | |
| DLL_API void | edax_book_save (const char *) | 
| book save command.  More... | |
| DLL_API void | edax_book_import (const char *) | 
| book import command.  More... | |
| DLL_API void | edax_book_export (const char *) | 
| book export command.  More... | |
| DLL_API void | edax_book_merge (const char *) | 
| book merge command.  More... | |
| DLL_API void | edax_book_fix (void) | 
| book fix command.  More... | |
| DLL_API void | edax_book_negamax (void) | 
| book negamax command.  More... | |
| DLL_API void | edax_book_correct (void) | 
| book correct command.  More... | |
| DLL_API void | edax_book_prune (void) | 
| book prune command.  More... | |
| DLL_API void | edax_book_subtree (void) | 
| book subtree command.  More... | |
| DLL_API void | edax_book_stats_clean (void) | 
| book stats clean command.  More... | |
| DLL_API void | edax_book_show (Position *) | 
| book show command.  More... | |
| DLL_API void | edax_book_info (Book *) | 
| book info command.  More... | |
| DLL_API void | edax_book_count_bestpath (Board *, Position *) | 
| count the number of best paths in book.  More... | |
| DLL_API void | edax_book_count_board_bestpath (Board *, Position *, const int, const int, const int) | 
| count the number of best paths in book.  More... | |
| DLL_API void | edax_book_stop_count_bestpath (void) | 
| stop counting the number of best paths in book.  More... | |
| DLL_API void | edax_book_verbose (const int) | 
| book verbose command.  More... | |
| DLL_API void | edax_book_add (const char *) | 
| book add command.  More... | |
| DLL_API void | edax_book_check (const char *) | 
| book check command.  More... | |
| DLL_API void | edax_book_extract (const char *) | 
| book extract command.  More... | |
| DLL_API void | edax_book_deviate (int, int) | 
| book deviate command.  More... | |
| DLL_API void | edax_book_enhance (int, int) | 
| book enhance command.  More... | |
| DLL_API void | edax_book_fill (int) | 
| book fill command.  More... | |
| DLL_API void | edax_book_play (void) | 
| book play command.  More... | |
| DLL_API void | edax_book_deepen (void) | 
| book deepen command. caution: Currently, this function does not work correctly.  More... | |
| DLL_API void | edax_book_feed_hash (void) | 
| book feed-hash command.  More... | |
| DLL_API void | edax_book_add_board_pre_process (void) | 
| book add board preprocess.  More... | |
| DLL_API void | edax_book_add_board_post_process (void) | 
| book add board postprocess.  More... | |
| DLL_API void | edax_book_add_board (const Board *) | 
| book add board.  More... | |
| DLL_API void | edax_base_problem (const char *, const int, const char *) | 
| base problem command.  More... | |
| DLL_API void | edax_base_tofen (const char *, const int, const char *) | 
| base tofen command.  More... | |
| DLL_API void | edax_base_correct (const char *, const int) | 
| base correct command.  More... | |
| DLL_API void | edax_base_complete (const char *) | 
| base complete command.  More... | |
| DLL_API void | edax_base_convert (const char *, const char *) | 
| base convert command.  More... | |
| DLL_API void | edax_base_unique (const char *, const char *) | 
| base unique command.  More... | |
| DLL_API void | edax_set_option (const char *, const char *) | 
| set (option) command.  More... | |
| DLL_API char * | edax_get_moves (char *) | 
| get moves of the current game.  More... | |
| DLL_API int | edax_is_game_over (void) | 
| check if the current game is over.  More... | |
| DLL_API int | edax_can_move (void) | 
| check if the current player can move.  More... | |
| DLL_API void | edax_get_last_move (Move *) | 
| get last move.  More... | |
| DLL_API void | edax_get_board (Board *) | 
| get current board.  More... | |
| DLL_API int | edax_get_current_player (void) | 
| get current player.  More... | |
| DLL_API int | edax_get_disc (const int) | 
| get current number of discs.  More... | |
| DLL_API int | edax_get_mobility_count (const int) | 
| get current number of legal moves.  More... | |
| DLL_API void | edax_play_print (void) | 
| print play.  More... | |
| DLL_API void | edax_enable_book_verbose (void) | 
| enable book_verbose to get stdout by bprint.  More... | |
| DLL_API void | edax_disable_book_verbose (void) | 
| disable book_verbose not to get stdout by bprint.  More... | |
| DLL_API int | edax_board_is_pass (const Board *) | 
| Check if current player should pass.  More... | |
| DLL_API int | edax_board_get_square_color (const Board *, const int) | 
| Get square color.  More... | |
| static void | libedax_observer (Result *) | 
| void | ui_init_libedax (UI *) | 
| initialize libedax api.  More... | |
| void | ui_free_libedax (UI *) | 
| free resources used by libedax api.  More... | |
| void | auto_go (void) | 
| auto go with regard to mode.  More... | |
| void | book_cmd_pre_process (UI *) | 
| pre-process of book command.  More... | |
| void | book_cmd_post_process (UI *) | 
| post-process of book command.  More... | |
User interface header.
| #define DLL_API | 
| typedef struct BenchResult BenchResult | 
Bench result structure
| void auto_go | ( | void | ) | 
auto go with regard to mode.
| void book_cmd_post_process | ( | UI * | ui | ) | 
post-process of book command.
| ui | user interface. | 
| void book_cmd_pre_process | ( | UI * | ui | ) | 
pre-process of book command.
| ui | user interface. | 
| DLL_API void edax_base_complete | ( | const char * | base_file | ) | 
base complete command.
| base_file | game database file. | 
| DLL_API void edax_base_convert | ( | const char * | base_file_from, | 
| const char * | base_file_to | ||
| ) | 
base convert command.
| base_file_from | input game database file. | 
| base_file_to | output game database file. | 
| DLL_API void edax_base_correct | ( | const char * | base_file, | 
| const int | n_empties | ||
| ) | 
base correct command.
| base_file | game database file. | 
| n_empties | number of empties. | 
| DLL_API void edax_base_problem | ( | const char * | base_file, | 
| const int | n_empties, | ||
| const char * | problem_file | ||
| ) | 
base problem command.
| base_file | game database file. | 
| n_empties | number of empties. | 
| problem_file | problem_file to save. | 
| DLL_API void edax_base_tofen | ( | const char * | base_file, | 
| const int | n_empties, | ||
| const char * | problem_file | ||
| ) | 
base tofen command.
| base_file | game database file. | 
| n_empties | number of empties. | 
| problem_file | problem_file to save. | 
| DLL_API void edax_base_unique | ( | const char * | base_file_from, | 
| const char * | base_file_to | ||
| ) | 
base unique command.
| base_file_from | input game database file. | 
| base_file_to | output game database file. | 
| DLL_API void edax_bench | ( | BenchResult * | result, | 
| int | n | ||
| ) | 
bench (a serie of low level tests). command.
| DLL_API void edax_bench_get_result | ( | BenchResult * | result | ) | 
Get square color.
| DLL_API void edax_book_add | ( | const char * | base_file | ) | 
book add command.
| base_file | base file to add. | 
book add board.
| board | board to add. | 
| DLL_API void edax_book_add_board_post_process | ( | void | ) | 
book add board postprocess.
| DLL_API void edax_book_add_board_pre_process | ( | void | ) | 
book add board preprocess.
| DLL_API void edax_book_check | ( | const char * | base_file | ) | 
book check command.
| base_file | base file to check. | 
| DLL_API void edax_book_correct | ( | void | ) | 
book correct command.
count the number of best paths in book.
| board | board to count the number of best paths. | 
| position | the number of best paths(out parameter) | 
| DLL_API void edax_book_count_board_bestpath | ( | Board * | board, | 
| Position * | position, | ||
| const int | p_lower, | ||
| const int | o_lower, | ||
| const int | turn | ||
| ) | 
count the number of best paths in book.
| board | board to count the number of best paths. | 
| position | the number of best paths(out parameter) | 
| p_lower | lower limit for player (BESTPATH_BEST:best moves only) | 
| o_lower | lower limit for opponent (BESTPATH_BEST:best moves only) | 
| turn | turn | 
| DLL_API void edax_book_deepen | ( | void | ) | 
book deepen command. caution: Currently, this function does not work correctly.
| DLL_API void edax_book_depth | ( | const int | depth | ) | 
book depth command.
| depth | depth. | 
| DLL_API void edax_book_deviate | ( | int | relative_error, | 
| int | absolute_error | ||
| ) | 
book deviate command.
| relative_error | relative error. | 
| absolute_error | absolute error. | 
| DLL_API void edax_book_enhance | ( | int | midgame_error, | 
| int | endcut_error | ||
| ) | 
book enhance command.
| midgame_error | midgame error. | 
| endcut_error | endcut error. | 
| DLL_API void edax_book_export | ( | const char * | export_file | ) | 
book export command.
| export_file | file name to export. | 
| DLL_API void edax_book_extract | ( | const char * | base_file | ) | 
book extract command.
| base_file | base file to extract. | 
| DLL_API void edax_book_feed_hash | ( | void | ) | 
book feed-hash command.
| DLL_API void edax_book_fill | ( | int | fill_depth | ) | 
book fill command.
| fill_depth | fill depth. | 
| DLL_API void edax_book_fix | ( | void | ) | 
book fix command.
| DLL_API void edax_book_import | ( | const char * | import_file | ) | 
book import command.
| import_file | file name to import. | 
book info command.
| book | book information(out parameter). | 
| DLL_API void edax_book_load | ( | const char * | book_file | ) | 
book load command.
| book_file | book file name to load. | 
| DLL_API void edax_book_merge | ( | const char * | book_file | ) | 
book merge command.
| book_file | file name to merge. | 
| DLL_API void edax_book_negamax | ( | void | ) | 
book negamax command.
| DLL_API void edax_book_new | ( | const int | level, | 
| const int | depth | ||
| ) | 
book new command.
| level | level. | 
| depth | depth. | 
| DLL_API void edax_book_off | ( | void | ) | 
book off command.
| DLL_API void edax_book_on | ( | void | ) | 
book on command.
| DLL_API void edax_book_play | ( | void | ) | 
book play command.
| DLL_API void edax_book_prune | ( | void | ) | 
book prune command.
| DLL_API void edax_book_randomness | ( | const int | randomness | ) | 
book randomness command.
| randomness | randomness. | 
| DLL_API void edax_book_save | ( | const char * | book_file | ) | 
book save command.
| book_file | book file name to save. | 
book show command.
| position | position information(out parameter). | 
| DLL_API void edax_book_stats_clean | ( | void | ) | 
book stats clean command.
| DLL_API void edax_book_stop_count_bestpath | ( | void | ) | 
stop counting the number of best paths in book.
| DLL_API void edax_book_store | ( | void | ) | 
book store command.
| DLL_API void edax_book_subtree | ( | void | ) | 
book subtree command.
| DLL_API void edax_book_verbose | ( | const int | book_verbosity | ) | 
book verbose command.
| book_verbosity | book verbosity. | 
| DLL_API int edax_can_move | ( | void | ) | 
check if the current player can move.
| DLL_API void edax_disable_book_verbose | ( | void | ) | 
disable book_verbose not to get stdout by bprint.
| DLL_API void edax_enable_book_verbose | ( | void | ) | 
enable book_verbose to get stdout by bprint.
| DLL_API void edax_force | ( | char * | moves | ) | 
force command.
| moves | moves. | 
get current board.
| board | current board(out parameter). | 
get book moves.
| move_list | result (out parameter). | 
get book moves.
| move_list | result (out parameter). | 
| DLL_API int edax_get_bookmove_with_position_by_moves | ( | const char * | moves, | 
| MoveList * | move_list, | ||
| Position * | position | ||
| ) | 
get book moves.
| move_list | result (out parameter). | 
| position | result (out parameter). | 
| DLL_API int edax_get_current_player | ( | void | ) | 
get current player.
| DLL_API int edax_get_disc | ( | const int | color | ) | 
get current number of discs.
| color | player's color(0:BLACK, 1:WHITE). | 
get last move.
| move | last move(out parameter). | 
| DLL_API int edax_get_mobility_count | ( | const int | color | ) | 
get current number of legal moves.
| color | player's color(0:BLACK, 1:WHITE). | 
| DLL_API char * edax_get_moves | ( | char * | str | ) | 
get moves of the current game.
| str | buffer of length 160 + 1 or more (out parameter). | 
| DLL_API void edax_go | ( | void | ) | 
go command.
hint command.
| n | number of hints. | 
| hintlist | result (out parameter). | 
hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function.
| n | number of hints. | 
| hintlist | result (out parameter). | 
hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function. This command is for analyze use.
| n | number of hints. | 
| hintlist | result (out parameter). | 
hint command. Call edax_hint_next after calling this function.
| DLL_API void edax_hmirror | ( | void | ) | 
hmirror command.
| DLL_API void edax_init | ( | void | ) | 
init command.
| DLL_API int edax_is_game_over | ( | void | ) | 
check if the current game is over.
| DLL_API void edax_load | ( | const char * | file | ) | 
load command.
| file | file name to open | 
| DLL_API void edax_mode | ( | const int | mode | ) | 
mode command.
| mode | mode to set | 
| DLL_API int edax_move | ( | const char * | move | ) | 
user move command.
| move | user move. | 
| DLL_API void edax_new | ( | void | ) | 
new command.
| DLL_API const char * edax_opening | ( | void | ) | 
opening command.
| DLL_API void edax_options_dump | ( | void | ) | 
dump options.
| DLL_API const char * edax_ouverture | ( | void | ) | 
ouverture command.
| DLL_API void edax_play | ( | char * | moves | ) | 
play command.
| moves | moves. | 
| DLL_API void edax_play_print | ( | void | ) | 
print play.
| DLL_API void edax_redo | ( | void | ) | 
redo command.
| DLL_API void edax_rotate | ( | const int | angle | ) | 
rotate command.
| angle | angle for rotation | 
| DLL_API void edax_save | ( | const char * | file | ) | 
save command.
| file | file name to save | 
| DLL_API void edax_set_option | ( | const char * | option_name, | 
| const char * | val | ||
| ) | 
set (option) command.
| option_name | name of option. | 
| val | value to set. | 
| DLL_API void edax_setboard | ( | const char * | board | ) | 
setboard command.
| board | board to set | 
setboard command with board object.
| board | board to set | 
| turn | player to play | 
| DLL_API void edax_stop | ( | void | ) | 
stop command.
| DLL_API void edax_symetry | ( | const int | sym | ) | 
symetry command.
| sym | symetry. | 
| DLL_API void edax_undo | ( | void | ) | 
undo command.
| DLL_API void edax_version | ( | void | ) | 
version command.
| DLL_API void edax_vmirror | ( | void | ) | 
vmirror command.
| DLL_API void libedax_initialize | ( | int | argc, | 
| char ** | argv | ||
| ) | 
edax init function for library use.
| argc | Number of arguments. | 
| argv | Command line arguments. | 
      
  | 
  static | 
| DLL_API void libedax_terminate | ( | void | ) | 
edax terminate function for library use.
| void ui_book_init | ( | UI * | ) | 
| bool ui_event_exist | ( | UI * | ui | ) | 
ui_event_exist
Locked version of event_exist.
| ui | User interface. | 
| void ui_event_free | ( | UI * | ui | ) | 
Free events.
Allocate event resources & launch user-input event thread.
| void ui_event_init | ( | UI * | ui | ) | 
Create a new Othello User Interface.
Allocate event resources & launch user-input event thread.
| bool ui_event_peek | ( | UI * | ui, | 
| char ** | cmd, | ||
| char ** | param | ||
| ) | 
Wait input.
| ui | User interface. | 
| cmd | Command. | 
| param | Command's parameters. | 
| void ui_event_wait | ( | UI * | ui, | 
| char ** | cmd, | ||
| char ** | param | ||
| ) | 
Wait input.
| ui | User interface. | 
| cmd | Command. | 
| param | Command's parameters. | 
| void ui_free_cassio | ( | UI * | ) | 
| void ui_free_edax | ( | UI * | ui | ) | 
free resources used by edax protocol.
| ui | user interface. | 
| void ui_free_ggs | ( | UI * | ui | ) | 
ui_free_ggs
Free GGS.
| ui | User Interface. | 
| void ui_free_gtp | ( | UI * | ui | ) | 
free resources used by edax protocol
| ui | user interface | 
| void ui_free_libedax | ( | UI * | ui | ) | 
free resources used by libedax api.
| ui | user interface. | 
| void ui_free_nboard | ( | UI * | ui | ) | 
free resources used by edax protocol
| ui | user interface | 
| void ui_free_xboard | ( | UI * | ui | ) | 
free resources used by xboard protocol.
| ui | user interface. | 
| void ui_init_cassio | ( | UI * | ) | 
| void ui_init_edax | ( | UI * | ui | ) | 
initialize edax protocol.
| ui | user interface. | 
| void ui_init_ggs | ( | UI * | ui | ) | 
ui_init_ggs
Init GGS interface.
| ui | User Interface. | 
| void ui_init_gtp | ( | UI * | ui | ) | 
initialize edax protocol
| ui | user interface | 
| void ui_init_libedax | ( | UI * | ui | ) | 
initialize libedax api.
| ui | user interface. | 
| void ui_init_nboard | ( | UI * | ui | ) | 
initialize edax protocol
| ui | user interface | 
| void ui_init_xboard | ( | UI * | ui | ) | 
initialize xboard protocol.
| ui | user interface. | 
| void ui_loop_cassio | ( | UI * | ) | 
| void ui_loop_edax | ( | UI * | ui | ) | 
Loop event.
| ui | user interface. | 
| void ui_loop_ggs | ( | UI * | ui | ) | 
ui_loop_ggs
GGS main loop. Here the input from both the user and GGS server is interpreted.
| ui | User Interface. | 
| void ui_loop_gtp | ( | UI * | ui | ) | 
Loop event.
| ui | user interface | 
| void ui_loop_nboard | ( | UI * | ui | ) | 
Loop event.
| ui | user interface | 
| void ui_loop_xboard | ( | UI * | ui | ) | 
Loop event.
| ui | user interface. | 
| bool ui_switch | ( | UI * | ui, | 
| const char * | ui_type | ||
| ) | 
Switch between different User Interface.
| ui | User Interface. | 
| ui_type | A string describing the chosen user interface. |