From b6fdffd958c0af05958a27a169d515cf1c581860 Mon Sep 17 00:00:00 2001 From: Alexander Munch-Hansen Date: Tue, 6 Mar 2018 13:08:01 +0100 Subject: [PATCH] fix bot.py --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 75fab80..a39fab1 100644 --- a/bot.py +++ b/bot.py @@ -40,8 +40,8 @@ class Bot: legal_moves = Board.calculate_legal_states(board, sym, roll) moves_and_scores = [ (move, self.network.eval_state(np.array(move).reshape(1,26))) for move in legal_moves ] scores = [ x[1] for x in moves_and_scores ] - best_move = moves_and_scores[np.array(scores).argmax()][0] + best_move_pair = moves_and_scores[np.array(scores).argmax()] #print("Found the best state, being:", np.array(move_scores).argmax()) - return best_move + return best_move_pair # return random.choice(list(legal_moves))