Closed davidjha closed 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.
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.
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).
master does not generate csv files unless the MySQL server is running, need to run batch_data branch to get the csv files.
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.
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](https://raw.githubusercontent.com/c-to-the-fazzy/cardiathena/master/documentation/img/bad_data.png)
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]))