-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAction.py
23 lines (18 loc) · 827 Bytes
/
Action.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# =============================================================================
# import chess
# from encode_decode import decode_action
# =============================================================================
# Acts as a wrapper around move by storing the move index (encoded move)
class Action(object):
def __init__(self, move_no: int):
self.index = move_no
def __hash__(self):
return self.index
def __eq__(self, other):
return self.index == other.index
def __gt__(self, other):
return self.index > other.index
# =============================================================================
# def get_move(self, hidden_state: chess.Board) -> chess.Move:
# return decode_action(hidden_state, self.index)
# =============================================================================