Skip to content

Commit

Permalink
[modify] kawa to_json
Browse files Browse the repository at this point in the history
  • Loading branch information
critter-mj committed Apr 16, 2020
1 parent c96a67d commit 027c500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mjtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 027c500

Please sign in to comment.