mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-05-22 23:35:19 +08:00
Fix test failures caused by a NumPy 1.21 upgrade
PiperOrigin-RevId: 418208713
This commit is contained in:
committed by
Diego de Las Casas
parent
68473a2243
commit
41256fd5e9
@@ -117,7 +117,7 @@ class TicTacToeRandomOpponent(logic_base.Opponent):
|
||||
valid_moves = game_logic.open_spiel_state.legal_actions()
|
||||
assert valid_moves
|
||||
move = random_state.choice(valid_moves)
|
||||
row, col = np.unravel_index(move, dims=(3, 3))
|
||||
row, col = np.unravel_index(move, shape=(3, 3))
|
||||
return SingleMarkerAction(row=row, col=col)
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ def numpy_array_to_open_spiel_state(board_state):
|
||||
|
||||
|
||||
def open_spiel_move_to_single_marker_action(action):
|
||||
row, col = np.unravel_index(action, dims=(3, 3))
|
||||
row, col = np.unravel_index(action, shape=(3, 3))
|
||||
return SingleMarkerAction(row=row, col=col)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user