12 ms·
Primel – guess a 5 digit prime number – each guess must be a prime
- bArray 5y agoMy path: 1 2 [3] 4 7 [5][6](8)[9][3] (6)(5)(8)(3)(9) Fun game! Might take a while to explain to people though!
- loaddlmath 5y agoPrimel 22 3/6 ⬜⬜ 18413 ⬜ 28163 98123
- raxxorrax 5y agoNot easy. Mine: 65537 12497 80747 23459 64217 14771
- tlholaday 5y ago00003 is not a prime?
- simonlc 5y agoIt's not a 5 digit prime.
- tlholaday 5y ago0 is a digit. Apparently I have stumbled over an idiom of the prime-enthusiast community.
- zamadatix 5y agoI don't think the different usage is related to an individual group rather context, particularly when referring to numbers. E.g. 3 is a 1 digit number because that's the number of digits needed to uniquely identify 3. There are infinitely more ways to identify 3 the number with padded 0s but those aren't useful unless you're talking about combinations/sequences of groups of digits (like random numbers or PIN codes) instead of actual number values.
- NickM 5y agoI don't think it's specific to "the prime-enthusiast community". Most people would look at you oddly if you claimed that 3 is a five-digit number.
- lapetitejort 5y agoOn the flip side, many people here would claim that 0x00000003 is an eight digit number.
- floatingatoll 5y agoOnly to win an argument by nitpick golfing. In everyday serious conversation that’s a 4-byte number, not an 8-digit number.
- eCa 5y ago> 0 is a digit. It’s not a significant digit[0], though, when it’s leading. [0] https://en.wikipedia.org/wiki/Significant_figures https://en.wikipedia.org/wiki/Significant_figures
- geephroh 5y agoI agree -- maybe technically not a digit, but I'd argue it's a UX issue if it is allowed in the leading slot. But I still love the concept!
- deleted 5y ago[deleted]
- tlholaday 5y agoEdit: Alas, the yellow and green square emoji are discarded. ⬛⬛⬛⬛ ⬛⬛⬛ ⬛ Partially interpreted: ⬛⬛🟨⬛⬛ 🟨⬛🟨⬛⬛ 🟨🟨🟨⬛🟩 🟩🟩🟩🟩🟩
- simonlc 5y agoPrimel 20 2/6 Edit, I guess HN doesn't like emojis lol
- hcrisp 5y agoHarder than Wordle but still solvable. Mine: 95317 -+- 25943 +- - 65393 ++-- 65839 +++++ Some luck, but you can also lock in odd numbers before proceeding to add evens. And it obviously can't end in an even.
- deleted 5y ago[deleted]
- zamadatix 5y ago97501 and 24683 will get you all of the numbers (and maybe some position matches), from there it becomes much easier.
- MauranKilom 5y ago12347 - 65393 ++-- [solution next - omitted for spoiler reasons] I was more surprised about how little trial and error I needed to find primes than about how few guesses it actually took...
- syrgian 5y agoSame, I was so surprised to get it solved at the second row, after ~8 attempts to find a prime without the numbers that had not matched. 12347 - [solved]
- 07d046 5y agoIt seems a lot of us came up with 12347 for the first line.
- MauranKilom 5y agoWhile natural in terms of just inputting numbers, it's also not bad to use as first guess because primes are denser (in an "average absolute distance" sense) the lower the magnitude you're around. Without having checked, I would expect there to be more primes of the form 123** than 987**, so you're more likely to gain correct digits with this guess. Edit: I checked, it's 9 vs 8 primes. But nearby prefixes also have more and there's a lot of variance. Still, there are overall more primes among the same range of smaller numbers (1000-5499 has ~4400 primes, 5500-99999 has ~4000). Note that, despite this, you probably shouldn't include 0 in the starting guess (e.g. 10247) because 0 will be in the solution less frequently (can't be the leading digit), meaning you gain less info on average.
- scythe 5y ago56809 is a pretty good second guess for this situation :p
- dalmo3 5y agoHa, those were exactly my first 2 guesses.
- metalliqaz 5y agoSo are people just really good with numbers? I don't know any 5 digit primes nor do I know a way to calculate them on the fly.
- eganist 5y agoI intuited a probably-inaccurate trick with exponentially raising a small prime (e.g 7*7*7etc), doubling the multiple (*2), and subtracting 1 (to get an odd number). That got me two substantially-different primes and narrowed my numbers a lot, which then became guesswork. My guesses in the end: -?--- ?---! ?-??! ?!??! !!!!!
- metalliqaz 5y agolol this would not help me at all by the way am I supposed to take some meaning from the italicized '7' or was that just a typo?
- ColinWright 5y agoHe probably had 7x7x7, but with asterisks instead of the "x"s.
- eganist 5y agocorrect, thanks for the heads up. Fixed
- madcaptenor 5y agoThe number you come up with in that way is at least guaranteed to not be divisible by 2 or 7. Obviously that doesn't mean it's prime but it definitely helps your odds.
- naniwaduni 5y agoAlso usefully, (2(a+1)^n-1) % a = (2a(a+1)^(n-1) + 2(a+1)^(n-1) - 1) % a = 1. So if you choose one of the 3k+1 primes, it's also guaranteed not divisible by 3.
- beardyw 5y agoCan't work out how to play again.
- procinct 5y agoI have the same problem with the cross words in my newspaper ;)
- mandarax8 5y agoClear local storage.
- KMnO4 5y agoWow, that’s some bad UX. Especially when it can’t as easily be done on mobile.
- roelschroeven 5y agoOr play in privacy mode. The intent, I think, is to mimic how Wordle works. Wordle has one puzzle per day, progress and statistics are stored in a cookie on your local machine (and only there). You can clear the cookie or use another browser or privacy mode to play multiple times per day, but you'll always get the same word.
- SamBam 5y agoIt's a clone of Wordle. There is a single correct answer per day, and everybody gets the same puzzle. There will be a new answer tomorrow. So, since the puzzle will be the same, there isn't a huge amount of reason to let you reset. The page could have made that clearer. (Wordle says it when you open it the first time, and also under the help menu.) I double-checked this by looking at the sourcecode.
- beardyw 5y ago> So, since the puzzle will be the same, there isn't a huge amount of reason to let you reset. Good point! Somehow, being numbers, I thought it would just make up another.
- omarhaneef 5y agoCrowdsourcing decryption on the web is so crazy... it just might work. Now come up with a hash that starts with many zeroes.
- throwhauser 5y agoThere should be an option to use the "numbers" that are prime in a different universe.
- lupire 5y agowhat would that be?
- whoomp12342 5y ago"oops, sorry that one was discovered already"
- deleted 5y ago[deleted]
- 07d046 5y agoI thought coming up with primes would be very challenging, but then my first three guesses were all prime (all I did was pick numbers that ended with odd numbers that weren't five). I got it on the fourth after a few attempts at entering the number - the prime constraint here makes it easier. There are 8,363 five digit primes. If you limit your guesses to numbers ending in 1, 3, 7, and 9, there is a 23% chance of randomly picking a prime.
- phreenet 5y agoFirst attempt I tried: 45677 56779 (Didn't read the instructions, the 5 should have stayed from 1st) 15809 35869 65839 (Solved) EDIT: I'm slow today, just realized they are both the same primes.
- cbsmith 5y agoAmusing to see people starting with odd digits so much. You're going to have to use an odd digit in every guess, so you can more efficiently explore the space by going after all the even digits first with 24683.
- mlyle 5y ago56843 was mine, for similar reasons.
- paradite 5y agoLooks very nice. However it took me a while to figure out why I kept getting error. It wasn't obvious to me that you are required to enter prime numbers only. Maybe consider dropping this constraint? Also, might want to disable text selection via css because I kept selecting the numbers on the button on my phone.
- ryanschneider 5y agoSomeone more skilled than me make Assemble, each box is an x86 opcode and the program must terminate (or maybe NOT terminate?).
- vehemenz 5y agoI solved it on the first try! (after cheating with localStorage)
- egberts1 5y agoMasterMind! Just say so!
- randstring 5y agoI couldn't come up with any primes, nor I'm any good with numbers, so I started with the prime from the game example: 71429 Than I already had one digit guessed and simply clicked the unused numbers from the virtual numpad below and got to having all digits with just two being in the wrong place: 35869 Now this was easy to figure out. Got the following score: 20 3/6
- logitjoy 5y agoI did 235711*13 - 1
- logitjoy 5y agoPrimel 20 6/6 ⬜⬜⬜30029 ⬜⬜⬜⬜12347 ⬜⬜⬜⬜33331 ⬜⬜⬜⬜13337 86539 65839
- deleted 5y ago[deleted]
- airstrike 5y agoI got a popup 'Not a 5 digit prime' on my first try and it wouldn't let me try any further. Not sure if I'm dense or if the UX is just terrible I had tried 18141, by the way, which I modestly think was a pretty good guess in hindsight given its only two factors are 3 and 6047. 19141 would have been a prime, but perhaps not the one I was supposed to find? I don't play Wordle so I'm a little confused
- xendo 5y agowhen sum of the digits is divisible by 3, the number itself is divisible by 3 1+8+1+4+1 = 15 15/3 = 5
- airstrike 5y agoSure, but that shouldn't halt the game entirely, should it?
- bidirectional 5y agoOnly primes are valid guesses, just like how in Wordle only English words found in a dictionary are valid.
- floatingatoll 5y agoWere you able to hit the delete key and remove the typed numbers? (Works on wordle too)
- NAHWheatCracker 5y agoYou have to click delete to reset the last digit. I think it should clear the whole guess after an invalid guess.
- baking 5y agoThat would be annoying.
- deleted 5y ago[deleted]
- tobyjsullivan 5y agoMy side-project this week has been searching for an optimal Wordle strategy. I figured it would make a great blog post but I haven't got that far yet. Step 1 is to find an optimal starting word. My most insightful finding so far has came from trying to define a cost function for comparing potential starting words. It turns out that "% of potential guesses [not] eliminated" is an excellent loss function. Importantly, the full set of all Acceptable Guesses is knowable. For any given (guess, answer) pair, the game provides feedback about each character (or digit). There are basically three pieces of potential feedback: (N)ot Used, (U)sed Elsewhere, (E)xact Match. For example, a single guess might produce the feedback "NUNNE". Each of these will eliminate some subset of Acceptable Guesses which means you can attribute a fixed value between 0.0 and 1.0 to any piece of feedback, and multiply those together to get the loss score of a given guess. Average that across all Potential Answers to get a cost score. Not sure what my goal of this post is. Guess I just wanted to share that these games are as much fun to analyze as they are to play (if not more).
- airza 5y agoYou are looking for Information Gain and Mutual Information (concepts from information theory). Have fun!
- HWR_14 5y agoSince you've been looking into it, how are words with multiple of the same letters treated on Wordle. If there are two (or three) 'E' in the solution or the guess?
- CrazyStat 5y agoI've spent some time analyzing Wordle (my starting words are SOARE and then BUILT, unless I've already got strong clues from SOARE). If the answer has one E and you guess a word with two Es, only one of the Es will be marked correct (green/yellow). If one of the Es is in the correct place, it will be green and the other one grey. Otherwise the first E will be yellow and the second grey. So if the answer has fewer Es than your guess the game tells you. If the answer has more Es than your guess there is no indication of this.
- culi 5y agoA list of possible primes showing up as you type would be helpful...
- basemntunivrse 5y agoThis is really cool, nice idea! Also, the following script might help to make the game more accessible (or to help you cheat :P) - // note: game doesn't seem to automatically clear at the end, so in the dev console use: // window.localStorage.clear(); // then refresh the page const prime = n => { for (let i = 2, s = Math.sqrt(n); i <= s; i++) { if (n % i === 0) { return false; } } return n > 1; } const generateNums = digits => ( m => [...Array(9 * m).keys()].map(i => i + m) )(Math.pow(10, digits - 1)); const generate5DigitPrimes = () => generateNums(5).filter(prime); const all5DigitPrimes = generate5DigitPrimes(); // updated to take an optional array (defaults to all5DigitPrimes) // this means you can chain the check function to do things that normal regex can't do // e.g. check(/some_regex/, check(/some_other_regex/)) const check = (r, a = all5DigitPrimes) => a.filter(p => r.test('' + p)); Usage: paste the above code into the dev console type 'all5DigitPrimes' and press Enter to see a list of all 5-digit primes type 'check(/some_regular_expression/)' to see a filtered list of primes that match your regular expression
- scythe 5y agoI also cheated with a script, leading to this: https://pastebin.com/sQtekXCW https://pastebin.com/sQtekXCW
- sebastialonso 5y agoThis is neat! Although the prime constraint makes this a lot easier than Mastermind
- nickponline 5y agoMy first inclination was to write a solver :) https://gist.github.com/nickponline/9a3fb1ee5333c52ed195625ea17c15b2 https://gist.github.com/nickponline/9a3fb1ee5333c52ed195625e...
- snk 5y agoNice solver! I did optimize the sieve a little... N = 100000 primes = [False, True] * N // 2 for i in range(3, N, 2): if primes[i]: k = i ** 2 while k < N: primes[k] = False k += i * 2
- snk 5y agoN = 100000 prime = [False, True] * (N // 2) primes = [] for i in range(3, N, 2): if prime[i]: primes.append(i) k = i ** 2 while k < N: prime[k] = False k += i * 2 useful = [ str(i) for i in primes ] # Enter your clues for i in useful: if i[0] == '6' and ('3' in i) and len(str(i)) == 5: print(i)
- popctrl 5y agoThis reminds me of something about flash games in the 2000s. I was in high school at the time and every morning in class I would check onemorelevel, kongregate, etc for new games. There was a pattern in flash games where someone would make a great simple game with an interesting, novel, or long-forgotten mechanic. It would get to the frontpage of all these sites, and a few months later you'd see that mechanic mixed with every other popular flash game mechanic. It was really cool to see a community of creative people embrace an idea and then beat it to death in a short period of time. I think in a lot of other creative genres, this kind of "copying your idea but a twist" is seen as poor form, plagiarism, or derivative. Maybe the flash game community was low enough stakes that it welcomed that kind of community engagement. I wonder what the people actually making the games thought. Anyway, this is a really cool example of that. It's wordle, but with a twist.
- d0mine 5y ago“Immature poets imitate; mature poets steal; bad poets deface what they take, and good poets make it into something better, or at least something different. The good poet welds his theft into a whole of feeling which is unique, utterly different than that from which it is torn.” https://www.benshoemate.com/2012/08/02/what-does-it-mean-good-artists-copy-great-artists-steal/ https://www.benshoemate.com/2012/08/02/what-does-it-mean-goo...
- deleted 5y ago[deleted]
- wy35 5y agoThe repo linked in the game seems to lead to a general Wordle clone. I’m guessing you forked it and replaced the keyboard with numbers and the word checker with a prime number checker?
- emeraldd 5y agoOk, so once you've won how do you start a new game?
- nsxwolf 5y agoPrimel 20 6/6 ⬜⬜⬜ ⬜ ⬜ ⬜ ⬜
- graycat 5y agoHint: The number should not end in any of 0, 2, 4, 6, or 8!
- snk 5y agoOr 5.
- deleted 5y ago[deleted]
- arbol 5y agoThis is way harder than wordle
- deleted 5y ago[deleted]
- nicodemus26 5y agoThis script took less than a second to run: seq 10000 99999 | factor | grep '^\([^:]*\): \1$' | cut -d: -f1 >5_digit_primes.txt Using that file with grep was helpful for refining guesses.
- b33j0r 5y agoI always appreciate a good shell pipeline, shared. I am stronger in python, and definitely wrote a script to cheat at Words With Friends back in the day (always told my friend afterwards and only pulled that stunt a few times). If I had known posix better, my script may very well have been a one-liner of bash. Awk-ward.
- charcircuit 5y agoThe prime detection is broken. I tried 00002, 00005, and 00031 and it said those aren't prime even though they are.
- zamadatix 5y agoIt says they aren't 5 digit primes. 2 and 5 are 1 digit primes, 31 is a 2 digit prime. Putting extra 0s in front of them doesn't change that.