From 027c500fd50fb441c72c60f3fd063bd3f6246f8c Mon Sep 17 00:00:00 2001 From: critter-mj Date: Thu, 16 Apr 2020 11:33:57 +0900 Subject: [PATCH] [modify] kawa to_json --- lib/mjtypes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mjtypes.py b/lib/mjtypes.py index 81a9bd9..206afc2 100644 --- a/lib/mjtypes.py +++ b/lib/mjtypes.py @@ -344,12 +344,12 @@ def to_numpy_fuuro(self): def to_numpy_kawa(self): length = 20 - ret = np.zeros((length + 1, 34), dtype=np.int) + ret = np.zeros((length*2, 34), dtype=np.int) for i in range(min(len(self.kawa),length)): hai = get_hai34(self.kawa[i].hai) - ret[i][hai] = 1 + ret[i*2][hai] = 1 if self.kawa[i].is_reach: - ret[length][hai] = 1 + ret[i*2+1][hai] = 1 return ret def to_numpy_tehai(self):