fix bot.py
This commit is contained in:
parent
d2b1f5d523
commit
b6fdffd958
4
bot.py
4
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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user