summaryrefslogtreecommitdiffstats
path: root/ai.hpp
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-02-20 20:28:57 +0000
committerJoursoir <chat@joursoir.net>2021-02-20 20:28:57 +0000
commitc226da49d5d8fd06d12dd443262a6b85e3285aba (patch)
tree5e01fd35e8205335e631251b602bb215924f3117 /ai.hpp
parent6a0fc4c8c53f539cf0779ec750b0282db74c63d1 (diff)
downloadlp-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.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ai.hpp b/ai.hpp
index ec1f56b..3edaa60 100644
--- a/ai.hpp
+++ b/ai.hpp
@@ -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 */