Skip to content

Commit

Permalink
Simplify training data
Browse files Browse the repository at this point in the history
  • Loading branch information
s2t2 committed Jan 22, 2022
1 parent 4848dfe commit 0d56078
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __repr__(self):
#def notation(self) -> str:
# """
# Represents the board's current state in simple string format like "-X-O-X-OX".
#
#
# Position corresponds with square names ['A1','B1','C1','A2','B2','C2','A3','B3','C3'] and indices [0,1,2,3,4,5,6,7,8].
# """
# return "".join([square.notation for square in self.squares])
Expand Down
9 changes: 6 additions & 3 deletions app/jobs/play_moves.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ def perform(self, export=True):
if export:
print("------------------------")
print("SAVING DATA TO FILE...")
csv_filename = f"{game.players[0].letter}_{game.players[0].player_type}"
csv_filename += "_vs_"
csv_filename += f"{game.players[1].letter}_{game.players[1].player_type}"
#csv_filename = f"{self.players[0].letter}_{self.players[0].player_type.replace('-','')}"
#csv_filename += "_vs_"
#csv_filename += f"_{self.players[1].letter}_{self.players[1].player_type.replace('-','')}"

csv_filename = self.players[0].player_type.replace('-','') + "_"
csv_filename += self.players[1].player_type.replace('-','')
csv_filename += f"_{self.GAME_COUNT}.csv"
csv_filename = csv_filename.lower()
csv_filepath = os.path.join(os.path.dirname(__file__), "..", "..", "data", "moves", csv_filename)
Expand Down
4 changes: 0 additions & 4 deletions app/square.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@ def is_selected(self):

@property
def notation(self):
return self.letter or "B"

@property
def display_notation(self):
return self.letter or "-"

0 comments on commit 0d56078

Please sign in to comment.