diff --git a/board.py b/board.py index 767ae45..35038ed 100644 --- a/board.py +++ b/board.py @@ -42,7 +42,7 @@ class Board: negatives = [x if x < 0 else 0 for x in board] board.append(15 - sum(positives)) board.append(-15 - sum(negatives)) - board += ([1, 0] if np.sign(player) > 0 else [1, 0]) + board += ([1, 0] if np.sign(player) > 0 else [0, 1]) return np.array(board).reshape(1,-1) @@ -67,7 +67,7 @@ class Board: features.append((board[0] if np.sign(player) < 0 else board[25]) / 2.0) # Calculate how many pieces there must be in the home state and divide it by 15 features.append((15 - sum) / 15) - features += ([1,0] if np.sign(cur_player) > 0 else [1,0]) + features += ([1,0] if np.sign(cur_player) > 0 else [0,1]) test = np.array(features).reshape(1,-1) #print("TEST:",test) return test