Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_heads_up_after_flop bug #39

Open
dsfdsfgdsa opened this issue Jun 15, 2020 · 3 comments
Open

test_heads_up_after_flop bug #39

dsfdsfgdsa opened this issue Jun 15, 2020 · 3 comments

Comments

@dsfdsfgdsa
Copy link
Contributor

Here the first actions from test_heads_up_after_flop and an assert which follow after that.
env.step(Action.ALL_IN) # seat 3 utg
env.step(Action.ALL_IN) # seat 4
env.step(Action.ALL_IN) # seat 5
env.step(Action.ALL_IN) # seat 0
env.step(Action.CALL) # seat 1 small blind = all in
env.step(Action.FOLD) # seat 2 big blind folds
assert sum(env.player_cycle.alive) == 2

This test has in my oppinion several bugs.

  1. After all actions should no player alive, because 5 players are allin they have a remaining stack of 0 so they cant do any additional actions. 1 player fold, so no actions is possible. But this test is a green one. I try to fix this, but i see that env.player_cycle.alive changed behaviour often. Sometimes is index 2 and 4 true other times index 0 and 3 and so on.
  2. See 1 the test name and the implemented behavior is not the same. Test name expected a heads up, but there is no generation of a scenario for headsup.

Because of these points I recommend to ignore this test and and also add a comment why is it ignored.

@dickreuter
Copy link
Owner

Yes sounds good, please feel free to make the necessary changes. Ideally don't just comment out the test but fix it. We still need more test coverage and there are still edge cases that don't appear to be handled correctly. thanks

@dsfdsfgdsa
Copy link
Contributor Author

Yeah I agree a better test coverage would be nice. But in that case is a higher time afford required, because of changed behavior for env.player_cycle.alive by several executions of the test. I can only offer comment the test with my findings or ignore and comment. But dont worry I will try to find more bugs and cover my new findings with tests.

@dickreuter
Copy link
Owner

dickreuter commented Jun 15, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants