Re:Guess My RGB
by js4ever on Sunday March 31, 2024 @02:21PM
(#39886641)
Not bad, 18 to 43 attempts on 10 games I tried. Far from optimal but good enough :p
[ Parent
| on HN ]
I had an updated version which implemented a binary search, but I couldn't update my previous comment so I dropped it. That being said, due to the scoring function `score(r,g,b,rr,gg,bb)` giving the exact same score sometimes for neighbouring colors, the search would still have to repeat and wasn't much more optimal than the code you see above.