carlofazioli / cardiathena

A project to study strategies in the game of hearts, using distributed computing, AI, and data analytics.
GNU General Public License v3.0
6 stars 1 forks source link

Generating bad data - repeated agent moves #97

Closed davidjha closed 4 years ago

davidjha commented 4 years ago

Describe the bug I noticed in some of the csv files in the player action column, moves were being repeated. This is incorrect. The actual player moves are valid, it is only when saving the data that is the issue.

Expected behavior Should not have repeated moves.

Screenshots bad_data

Solution In base.py: player_action.append(current_player.get_action(partial_state[i]))1 self.state_data.append(self.state.save_state(str(current_player.get_action(partial_state[i]))))`

Get player action is called twice for the same player. self.state_data.append(self.state.save_state(player_action[i]))

irobert4 commented 4 years ago

How did you manage to get it to generate a csv file on your machine? I have the branch checked out that theres a pull request on and I would like to take a look.

davidjha commented 4 years ago

You'll need to checkout batch_upload branch, and change ON_ARGO to False in HeartsMySQLVariables.py. Then run play_hearts.py. It should create a cardiathena_hearts directory in your user directory. I think for windows its C:/Users/username/cardiathena_hearts/csv-files/. Then open that up in excel and you should be able to sort by asc order for the action column.

irobert4 commented 4 years ago

So the bad_data branch wont create any csv files? I don't see any on it from running play_hearts on that branch (there were a ton of csv files from when I was testing the batch_data branch though).

davidjha commented 4 years ago

master does not generate csv files unless the MySQL server is running, need to run batch_data branch to get the csv files.

aphelps4 commented 4 years ago

I am not sure I understand this one completely. You say the actions are the same yet you also say that you ordered the data by ascending order of actions? Unless this is in the same game, this seems fine. The decks are even slightly different for each of the repeated actions, leading me to believe these are indeed from different games.