From c226da49d5d8fd06d12dd443262a6b85e3285aba Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 20 Feb 2021 20:28:57 +0000 Subject: add alpha–beta pruning; fix bugs: uncorrect random move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ai.hpp') 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 */ -- cgit v1.2.3-18-g5258