←back to thread

Find the Odd Disk

(colors2.alessandroroussel.com)
192 points layer8 | 1 comments | | HN request time: 0.222s | source
Show context
lucb1e ◴[] No.43746609[source]
I was wondering if it got harder or if it's just random:

    function generateColors(difficulty, blacklist) {
        ...
        let sample = Math.floor(Math.min(Math.max(0, 1-Math.pow(1-difficulty, 1.5)), .99)*5);
        let distance = (5 - sample)/5;
        ...
    }
    function setupRound(blacklist) {
        ...
        const data = generateColors(currentRound/totalRounds, blacklist);
        ...
    }
Plotting that first magic: https://lucb1e.com/randomprojects/js/testformula.htm#%24%28%...

    round#  difference
     0-- 2  5
     3-- 5  4
     6-- 9  3
    10--13  2
    14--20  1
The "blacklist" parameter prevents that you get the same challenge twice. Note also that it submits every answer to the server (fine imo, but I think it would be even nicer if this was mentioned on the page)
replies(2): >>43747603 #>>43750004 #
tennysont ◴[] No.43747603[source]
I appreciate https://lucb1e.com/randomprojects/js/testformula.html, it's a cool idea!
replies(1): >>43747903 #
1. lucb1e ◴[] No.43747903[source]
Happy to hear, though note the file is without l (lowercase L) in the end (I guess autocorrupt is to blame here?). Fun fact: if you remove the filename, it'll show you all the crap in that directory, listing this file as being last modified in 2015-09-27. If past performance is an indicator, it should be stable to use for the next ten years as well :D