-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
differnt figure plotted when running mc.py #1
Comments
OK. Found the bug which caused the issue: it is in environment.py if np.random.random() <= 1/3: The condition is always false because 1/3 is evaluated to 0. So effectively the card values are never negative as described in the game rules. Changing it to the following will generate the correct figure: if np.random.random() <= 1.0/3: |
One more update: In python 3.0, 1/3 does evaluate to 0.3333... I was using python 2.7.6, which evaluates to 1/3 to 0 apparently. Surprised to see this behavior discrepancy in python (still new to it). |
Right. Do you get a similar plot with python3? |
Actually I don't have python3. But after changing "1/3" to "1.0/3" the plot changes to what you have. |
Here is what I got from running mc.py unmodified:
Any idea why it would be different?
The text was updated successfully, but these errors were encountered: