Live data from Hacker News

Finding Waldo in π

kundor.github.io

11–20 of 80 posts

Re: Finding Waldo in π

#11
> The pixel data in this gif are the 23,074,248th through 23,075,235th hexadecimal digits of π!

You might be surprised to learn that π! (pi factorial) is a thing that makes sense

π! = 7.1880827289760327020821943451247587185593017639684371624100356994...

https://www.wolframalpha.com/input?i=pi%21

Re: Finding Waldo in π

#12
post #7

If 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

I agree. Relying on an external data for interpretation is less impressive. The most impressive would be finding an exact GIF87a file. But, the cheating technique used here isn't a simple task either.

I converted the smallest valid GIF file[1] (35 bytes) into decimal number: 540959129019042423917857241427143195931235689921032801204995597056286563376232988672

It's nowhere to be found in PI :) I couldn't even find "GIF87a". So, fuzzy search seems to be a must.

[1] https://stackoverflow.com/questions/2570633/smallest-filesiz...

Re: Finding Waldo in π

#13
post #2

It’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 guess I disagree that it's "cheating" - it's more like they're playing a game with no actual rules, and therefore applying rules that are most convenient for their purposes to achieve victory.

I find their methodology for evaluating candidate Waldos to be as sufficient as any other.

What I mean is, they could certainly choose a much harder evaluation criteria and fail, but that's not much of a blog.

Re: Finding Waldo in π

#14
Really fun! Eventually we'll find one with an embedded palette.

This deeply reminds me of Carl Sagan's science fiction novel, Contact.

(spoilers to the novel follow, so avoid if you haven't read it)

The film adaptation missed out on so much, and the treatment of pi is one such unfortunate omission (or simplification).

The novel's aliens were advanced, but they told the main character that even they were stumped by the clear messages left encoded deep within the universe's constants.

It made the ending to the book so much more profound and touching than the film.

Carl was a master of making us feel small, all the while opening up our imaginations to infinities beyond measure.

Re: Finding Waldo in π

#15

> The pixel data in this gif are the 23,074,248th through 23,075,235th hexadecimal digits of π! You might be surprised to learn that π! (pi factorial) is a thing that makes sense π! = 7.1880827289760327020821943451247587185593017639684371624100356994... https://www.wolframalpha.com/input?i=pi%21

Yep, it’s just going through the gamma function.

Re: Finding Waldo in π

#16

> The pixel data in this gif are the 23,074,248th through 23,075,235th hexadecimal digits of π! You might be surprised to learn that π! (pi factorial) is a thing that makes sense π! = 7.1880827289760327020821943451247587185593017639684371624100356994... https://www.wolframalpha.com/input?i=pi%21

Well, for some definition of "make sense" yes, any arbitrary positive decimal number can have a factorial, and even negative non-integer numbers, thanks to the gamma function. I wouldn't really say it makes "sense" though, personally.

Re: Finding Waldo in π

#17
post #2

It’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/

> Finding 500 exact bytes

But they're not finding exact bytes, they're finding something that very vaguely looks like something very vague. It also helps a lot that it's a face and human brains are very good at identifying faces.

The number of 500 bytes that would "look like" waldo is a lot higher than 1.

Re: Finding Waldo in π

#18
post #7

If 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

Can someone explain to me where the palette is defined? If it's not in the bytes of waldo.gif, is it provided by the website itself? If I save the gif file, I still see it as the same on my computer. Is it not true that the bytes of the gif actually 100% match the bytes of pi? Is there some extra metadata not included in the bytes of the file itself? If I were to send those bytes over the wire and save them to a file, would it look different?

Re: Finding Waldo in π

#19
With acknowledgement to the palette hack discussed in the other comments, I still think there's a ton of value in this.

So often, people observe patterns in nature that appear to be so unlikely as to be by design. I have family members that are superstitious: if a light flickers at the same time that they mention a recently deceased loved one, it must be "a sign". Similarly, they will point to some overwhelmingly unlikely occurrence in the news, and ask, "how do you explain that?" The answer is usually random chance (if not deceit). And this exercise is a good illustration of that.

"Waldo, in the digits of pi?!? What are the odds??" - To the outsider who is not scientifically minded, this just looks so coincidental as to be magic. But almost any pattern can be found in randomness. It's just that the size of the necessary search space explodes as the query becomes larger / more specific.

The average HN reader knows all this, but the Waldo story is still a cool way to describe it to other people.

Re: Finding Waldo in π

#20
post #7

If 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

Can someone explain to me where the palette is defined? If it's not in the bytes of waldo.gif, is it provided by the website itself? If I save the gif file, I still see it as the same on my computer. Is it not true that the bytes of the gif actually 100% match the bytes of pi? Is there some extra metadata not included in the bytes of the file itself? If I were to send those bytes over the wire and save them to a file…

The part that's from π is the actual pixel data, which is extracted in the Python snippet "waldo.tobytes()". More-or-less equivalently, you could use "list(waldo.getdata())".

The GIF file as stored on disk has extra headers, and the pixel data's been compressed. So the whole file isn't found in the digits of π, just the pixel data itself.

I'd guess the chance of actually finding a correctly formatted full GIF file in contiguous bytes of π is effectively nil.

Post reply on HN