python icon indicating copy to clipboard operation
python copied to clipboard

[Random Concept]: Captains Log Exercise

Open colinleach opened this issue 1 year ago • 2 comments

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.

colinleach avatar Dec 26 '23 22:12 colinleach

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?

colinleach avatar Dec 26 '23 23:12 colinleach

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. 😅

BethanyG avatar Dec 26 '23 23:12 BethanyG