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

Count of days lost/won is sometimes wrong in quit_while_youre_ahead.py #1

Open
chapmanjacobd opened this issue Nov 10, 2022 · 1 comment

Comments

@chapmanjacobd
Copy link

I don't know the rules for roulette but the results don't seem right to me?

Simulating playing roulette over 100 days where you stop playing each day after winning 10000 or after losing 1000
Days where you came out ahead:  100
Days where you came out behind: 0
Total amount bet:               10000000
Total amount remaining:         9900000
Net winnings:                   -100000

The only thing I changed in the code is simulating 100 days instead of 1000. If I never had a day with a net negative amount, how can it be negative net winnings?

@pirate
Copy link
Owner

pirate commented Nov 18, 2022

I believe it's counting days where you won/lost 0 as a win, see the <= here: https://github.com/pirate/experiments/blob/master/quit_while_youre_ahead.py#L64

@pirate pirate changed the title roulette? Count of days lost/won is sometimes wrong in quit_while_youre_ahead.py Nov 18, 2022
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