Open teojunjie opened 5 years ago
Please send screenshots with line numbers in the future. First of all, I don't think your method of procuring bucket number is correct. The way you do this will return the same bucket number for rounds beyond preflop. As such you'll never be able to assess the following bucket sequence 0, 1, 2, 3.
Secondly, please add debug statements to see which line of code causes the program to terminate, and let us know your findings.
The following images can be found in branch uploadFileBranch in this repository.
The file below can be found in CFRAgent.py. I have included the line numbers for reference. Right now, I have changed the round community cards to be different based on which round i am currently indexing. I am not sure if this solves the problem that @unsatisfiedpopcorn has mentioned above.
This is currently my method of returning a list of community cards based on the current round i am indexing. The code below can be found in game_state.py in the same branch above.
However, after running all this code, the same error occurs where the code terminates prematurely as seen in the image below. The screenshot below are just print statements indicating in the following order:
loop : 1) street name 2) street community cards end 3) valid_actions for the current player 4) action taken 5) current score of cfr player against always raised player
This is my code regarding the declare action function in pypokerplayer, however, when I set example.py as shown below to be 1000 rounds, it terminates prematurely.
I tested it with an alwaysraisedplayer against another alwaysraisedplayer, assuming it was a bug on the pypokerengine side, but it wasn't the entire 1000 rounds ran and it was normal.
So this is my intepretation of the declare_action function in pypokerengine, the valid_actions parameter will return a list of actions that the current state allows, so if lets say raise is not allowed, the action raise will not be in the list. Am i right? So no matter what , my code should return a valid action? No? I am not sure please do help me take a look at this issue because its quite urgent so that i can give @unsatisfiedpopcorn the results that he needs for 1000e , 10000e ...