From 0352866b1ab1c6da3ac230479c4ebe8493ed71d0 Mon Sep 17 00:00:00 2001 From: JialianLee Date: Thu, 28 Dec 2017 16:27:28 +0800 Subject: [PATCH] Modification for game engine --- tianshou/core/mcts/unit_test/ZOGame.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tianshou/core/mcts/unit_test/ZOGame.py b/tianshou/core/mcts/unit_test/ZOGame.py index 8a2ed54..acad284 100644 --- a/tianshou/core/mcts/unit_test/ZOGame.py +++ b/tianshou/core/mcts/unit_test/ZOGame.py @@ -17,6 +17,10 @@ class ZOTree: seq.append(int(action)) return [seq, 0 - color], 0 + def simulate_hashable_conversion(self, state): + # since go is MDP, we only need the last board for hashing + return tuple(state[0]) + def executor_get_reward(self, state): seq = np.array(state[0], dtype='int16') length = len(seq)