46 and that was my ceiling. frogs smarter than me.
Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
41–48 of 48 posts
Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#42Looks like the leaderboard was hacked unfortunately. Fun little concept.
Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#43Leaderboard has been overtaken :(
Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#44Earlier quoted context omitted.
because it doesn't? practice mode requires no login. if you want to play a ranked match then you'll need an account, how else could it work?
> how else could it work? Username+password. There is zero reason to require e-mail for account creation.
Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#45Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#46Curious how a couple people got >100 hits on 100 punches
Re: Show HN: Brain Frog – Can you be random enough for 11 lines of JavaScript?
#47pure random player: (async function(punch, delay) { async function sleep(ms) { return new Promise((resolve, _) => { setTimeout(resolve, ms) }) } for (let i = 0; i "cheating" player: (async function(oracle, punch, delay) { async function sleep(ms) { return new Promise((resolve, _) => { setTimeout(resolve, ms) }) } for (let i = 0; i is it possible to do any better? i haven't fully read frog/oracle code
Less fancy hack here, intercept the prediction function on every punch and force the frog to take the opposite side. const realPunch = punch; punch = function(myMove) { oracle.predictNextPunch = function() { return myMove === 'L' ? 'R' : 'L'; }; realPunch(myMove); };