chinese_chess_ai2
简介
一个轻量级的中国象棋AI
组件接口
chinese_chess_ai2.gs
函数原型 | 函数作用 |
---|---|
array get_piece_moves(int x, int y) | 获取指定旗子的所有合法走法 |
array get_moves(bool using_iccs) | 获取所有合法的走法 |
bool move(int src_x, int src_y, int dst_x, int dst_y) | 走棋 |
string move_to_string(int src_x, int src_y, int dst_x, int dst_y) | 将坐标转换成ICCS走法字符串 |
array string_to_move(string move) | 将走法字符串转换成坐标 |
bool text_move(string move) | 走棋, 使用 UCCI 中的走法标识, 例如 "e2e4" |
bool ai_move(int depth, int time) | ai 走棋 |
void unmove() | 悔棋 |
string think(int depth, int time) | ai 思考 |
bool is_game_over() | 是否游戏结束 |
string get_fen() | 获取棋盘的 FEN 字符串 |
bool set_fen(string fen) | 设置棋盘的 FEN 字符串 |
void new_game() | 新游戏 |
Player get_turn() | 获取当前是哪方走棋 |
array get_board(bool using_chinese) | 获取棋盘 |
string display(bool using_chinese) | 显示棋盘 |