4 ms·
Prime Hunter sometimes generates sets with no prime numbers.
by getnormality 1y ago
Prime Hunter sometimes generates sets with no prime numbers.
- kevinventullo 1y agoAlso, tiny nit but the text at the end says the largest known prime number has over 24 million digits. While technically true, the current largest prime number in fact has over 41 million digits! (Also, I love this. I hope you’re still hosting it once I have kids)
- jldugger 1y ago> the current largest prime number in fact has over 41 million digits! Because there's an infinite number of primes?
- kevinventullo 1y ago*largest known :)
- gjm11 1y agoIn the few games I tried, it always ended up that way. You start with a few prime numbers (if you're lucky). Each time you click on one, it gets replaced with another number that usually isn't prime. After a short while, there are no primes left and then there's nothing to do but sit and wait for the game to end. Perhaps all the numbers should have a finite lifetime, after which they evaporate and a random new one replaces them.
- kevinventullo 1y agoOr maybe right click to identify a number as composite.
- ethan_smith 1y agoI can confirm this bug - your random number generation algorithm should ensure at least one prime appears in each set, perhaps by maintaining a pre-computed list of primes within your range and guaranteeing inclusion of at least one.
- min2bro 1y agoSure, I will take care of it. Thanks for the feedback
- mrgoldenbrown 1y agoYep, got stuck with this too.