diff options
author | Joursoir <chat@joursoir.net> | 2021-02-20 20:28:57 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-02-20 20:28:57 +0000 |
commit | c226da49d5d8fd06d12dd443262a6b85e3285aba (patch) | |
tree | 5e01fd35e8205335e631251b602bb215924f3117 /ai.hpp | |
parent | 6a0fc4c8c53f539cf0779ec750b0282db74c63d1 (diff) | |
download | lp-gomoku-c226da49d5d8fd06d12dd443262a6b85e3285aba.tar.gz lp-gomoku-c226da49d5d8fd06d12dd443262a6b85e3285aba.tar.bz2 lp-gomoku-c226da49d5d8fd06d12dd443262a6b85e3285aba.zip |
add alpha–beta pruning; fix bugs: uncorrect random move
Diffstat (limited to 'ai.hpp')
-rw-r--r-- | ai.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -11,9 +11,10 @@ public: AI(int p, int d); void GetBestMove(int &my, int &mx, GameField field); + void FirstMove(bool m) { first_move = m; } private: int score(GameField field); - int MinMax(GameField field, int depth); + int MinMax(GameField field, int alpha, int beta, int depth); }; #endif /* LPG_AI_H */ |