Created
May 1, 2025 20:25
-
-
Save mieubrisse/692813ea5c611a5fe71f56382bdb474b to your computer and use it in GitHub Desktop.
Calculating additional days I spend in a sleep deprivation cycle from point of realizing, varied on advice quality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
# chance_to_get_free = 0.3 # untrained | |
chance_to_get_free = 0.75 # exobrain | |
# From point of realizing I'm in a cycle and going to ChatGPT for advice | |
additional_days_spent_in_cycle = [] | |
for i in range(10_000_000): | |
for night_no in range(0, 6): | |
# Break on 5th night no matter what | |
if night_no == 5: | |
additional_days_spent_in_cycle.append(night_no) | |
break | |
# On other nights, follow advice to get free | |
if random.random() < chance_to_get_free: | |
additional_days_spent_in_cycle.append(night_no) | |
break | |
print(sum(additional_days_spent_in_cycle) / len(additional_days_spent_in_cycle)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment