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

[Random Concept]: Captains Log Exercise #3571

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

colinleach
Copy link
Sponsor Contributor

A possibility for the random concept? Please rate as OK/fixable/junk.

The tests are unusual, to deal with non-deterministic output. Please sanity-check them, both for accuracy and test-runner performance. I tried to pick a number of repeats that will give good coverage within a reasonable time, but this may need some fine-tuning.

@BethanyG BethanyG changed the title captains-log concept exercise [Random Concept]: Captains Log Exercise Dec 26, 2023
@colinleach
Copy link
Sponsor Contributor Author

Yes, I admit that's a better title.

Meanwhile, I tried estimating the chances that task 1 would randomly fail by excluding one of the possible planetary_classes from the results. I think the chance of a particular entry not being picked is 0.9 in each run (there are 10 to choose from). With 1000 runs, the chances of missing one is 0.9 ** 1000, about 1.7e-46. Good enough?

@BethanyG
Copy link
Member

BethanyG commented Dec 26, 2023

This has the danger of pulling me into a black hole around how to test random processes. 😉
But better we think through this now, since this won't be the only exercise with randomness in it.

chances of missing one is 0.9 ** 1000, about 1.7e-46. Good enough?

Yes. That sounds like good enough, but I'll probably do more thinking on it as I read through. First, I want to tackle some of the concept write-ups, so we can merge them down and cross them off our list. But this is certainly near the top of the TODO. 😄

🤔 We may also want to have a hint that explains those odds, for the (unlucky) chance that someone hits the scenario. You know me - I am paranoid. 😅

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

Successfully merging this pull request may close these issues.

2 participants