Finding Waldo in π
kundor.github.io
Finding Waldo in π
1–10 of 80 posts
Re: Finding Waldo in π
#2They do explain what they do: https://kundor.github.io/Cheating-images/
Re: Finding Waldo in π
#3It’s kind of obvious that they are cheating: 23,074,248th through 23,075,235th hexadecimal digits is approximately 500 bytes. Finding 500 exact bytes in a random sequence would take a very long expected sequence :-) They do explain what they do: https://kundor.github.io/Cheating-images/
In that case I'd be cool to know the probability in finding a close enough image in that optimized space
Re: Finding Waldo in π
#4It’s kind of obvious that they are cheating: 23,074,248th through 23,075,235th hexadecimal digits is approximately 500 bytes. Finding 500 exact bytes in a random sequence would take a very long expected sequence :-) They do explain what they do: https://kundor.github.io/Cheating-images/
I read this but I'm not sure how it's done. Does he run an optimization step to select the palette that minimizes the error? In that case I'd be cool to know the probability in finding a close enough image in that optimized space
In the candidate stream, byte 0 is 4. The error is minimised if byte 2 is also 4. The values of the bytes don't matter, just the patterns of which bytes have the same value.
Re: Finding Waldo in π
#5Hmm. I don't know that I agree. There are certainly more objective choices here than just picking any old palette, and in fact there are choices where it's not obvious the result should be considered a "palette" at all.
For example, the obvious choice to me is to treat the π bitstream as 8 bit RGB data like you would see in the PPM image format. In other words, one pixel at a time, each 8 bits represents a number from 0-255 for the red, green, and blue channel in that pixel respectively.
Of course that's a much harder ask since the colors are in this case not arbitrary, but you could (and should!!) still cheat at this by arbitrarily selecting the width of the resulting rows of pixels.
I'm not mad at seeing this palette based solution to the problem though, it's a very fun hack! Probably doing it for real would take an impossible amount of CPU time. Maybe if you did 4-bit RGB values it would be possible?
Re: Finding Waldo in π
#6Re: Finding Waldo in π
#7Re: Finding Waldo in π
#8> The trick is that we can reassign the colors using a palette. And in fact you always need to do this; you have to somehow decide which color each byte should represent. Hmm. I don't know that I agree. There are certainly more objective choices here than just picking any old palette, and in fact there are choices where it's not obvious the result should be considered a "palette" at all. For example, the obvious choi…
There's no doubt it's a much more objective choice than the one I used! I did say I was cheating.
Going to 4-bit color won't make it feasible. Even with 1-bit black/white pixels on about the minimum possible 18x24 Waldo face, you have 432 bits to look for, and you're not going to find them without cheating somehow. This guy on Twitter tried pretty thoroughly: https://twitter.com/gsuberland/status/1508697913177915393
For the palette hack, you want to go the other way; it's easier with bigger pixels. I was able to create a perfect Waldo face from the first 988 bytes of π as a TIFF, where the standard supports 16-bit palette indices for the pixel data. Unfortunately nothing except imagemagick seems to support actually viewing these TIFFs.
[1] https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_col...
Re: Finding Waldo in π
#9If you use a external pallete (one that is not coming from the pi digits themselves) I don't think it's that interesting. With any random set of data you can find a pallete that approximates the desired result