TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Finding Mona Lisa in the Game of Life

408 pointsby mseriabout 4 years ago

19 comments

montebicycleloabout 4 years ago
I did the same thing, but with gradient descent. You can create a soft version of the game of life, that is differentiable. Here is my messy collab notebook: [1]<p>[1] <a href="https:&#x2F;&#x2F;colab.research.google.com&#x2F;drive&#x2F;12CO3Y0JgCd3DVnQeNSB3J8WaZGAVo0Ln?usp=sharing" rel="nofollow">https:&#x2F;&#x2F;colab.research.google.com&#x2F;drive&#x2F;12CO3Y0JgCd3DVnQeNSB...</a><p>Edit: only 1 step though, not 4, as in the OP. I couldn&#x27;t get my differentiable version to converge more than 1 step into the past.
评论 #26386195 未加载
评论 #26385435 未加载
enriqutoabout 4 years ago
&gt; Running ~1000 iterations for a 483px wide Mona Lisa on the google colab GPU runtime only takes around 40 seconds!. Compared to the CPU version which takes several hours to do the same for a smaller image<p>Isn&#x27;t this excruciatingly slow? I remember my old 486 computer did run life at full-screen full-resolution in realtime (probably 25fps at 800x600 ?) How it has come to that after 20 years? How can a 20 year old CPU outperform a modern GPU by one order of magnitude? Is it all fault of lots of useless intermediary language layers?
评论 #26385182 未加载
评论 #26384958 未加载
评论 #26384986 未加载
评论 #26384946 未加载
sjg1729about 4 years ago
The parenthetical &quot;(Consider a loaf of bread, with each slice being dithered Mona Lisa).&quot; is one of my favorites of any technical article
jpalomakiabout 4 years ago
As a next step: how simple can you make the initial state. Can you have something that occupies much less space, but then grows to something that resembles the target image.
评论 #26385144 未加载
sethbannonabout 4 years ago
This comment may be too meta but this post just made me appreciate Hacker News so much! Classic creative hacking guided by nothing but pure curiosity. Love it!
lnyanabout 4 years ago
A similar post can be found here (2020, implemented with backsearch):<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22552006" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22552006</a><p><a href="https:&#x2F;&#x2F;kevingal.com&#x2F;blog&#x2F;mona-lisa-gol.html" rel="nofollow">https:&#x2F;&#x2F;kevingal.com&#x2F;blog&#x2F;mona-lisa-gol.html</a>
matsemannabout 4 years ago
Gotta be used for some capture-the-flag or so, where after running it a clue to the next step is revealed.<p>I also wonder how effective this would be as a compression algorithm (just for the fun of it). Are the black&amp;white spots too noisily distributed to make it compressable, or better than the resulting image after running GoL?<p>Also interesting that so little data is needed for my brain to understand it&#x27;s a picture of the David statue.
评论 #26386138 未加载
andersourceabout 4 years ago
Kaggle recently hosted a very relevant competition - &quot;Conway&#x27;s Reverse Game of Life&quot; [0]. A write-up of the 1st place might be an interesting read [1].<p>[0] <a href="https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;conways-reverse-game-of-life-2020&#x2F;overview" rel="nofollow">https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;conways-reverse-game-of-life-2020&#x2F;o...</a><p>[1] <a href="https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;conways-reverse-game-of-life-2020&#x2F;discussion&#x2F;200980" rel="nofollow">https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;conways-reverse-game-of-life-2020&#x2F;d...</a>
评论 #26385442 未加载
评论 #26388642 未加载
hardmath123about 4 years ago
Similar post from mid-2020, using PyTorch instead of JAX, and using a &quot;continuous&quot; (gradient-based) hill-climbing: <a href="http:&#x2F;&#x2F;hardmath123.github.io&#x2F;conways-gradient.html" rel="nofollow">http:&#x2F;&#x2F;hardmath123.github.io&#x2F;conways-gradient.html</a><p>And the HN discussion from the time: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23095190" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23095190</a>
lubesGordiabout 4 years ago
So my understanding is that the Game of Life is an undecidable system, so you basically can&#x27;t write a solvable system of equations that will tell you that your initial state will produce a Mona Lisa. Even after reading the article I don&#x27;t really understand what he&#x27;s doing to make this happen. And especially after stating that most states are Garden of Eden states! Can anyone ELI5?
评论 #26390439 未加载
jphowardabout 4 years ago
My understanding is Conway&#x27;s game of life can be done by simply convolving a 3x3 array of all ones (except a central 0) through every pixel, and then looking at the results of that convolution to see if the pixel is dead or alive, e.g. <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;46196346&#x2F;why-does-my-game-of-life-simulation-slow-down-to-a-crawl-within-seconds-matplot" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;46196346&#x2F;why-does-my-gam...</a><p>If that&#x27;s the case, would a nice solution be to model it as a recurrent neural network, e.g. pytorch or jax, with a single convolutional layer, with a single kernel, which you don&#x27;t backprop to, and then try to minimise to loss with reference to the target image, by backpropagating to the input image?<p>It then becomes highly analogous to Google&#x27;s deepdream, but instead of optimising the image for the output class, you optimise it to the output image.
评论 #26385404 未加载
评论 #26385529 未加载
评论 #26385451 未加载
7373737373about 4 years ago
For a similar challenge: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proof_game" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proof_game</a>
jansanabout 4 years ago
It never fails to amaze me what an infinite number of monkeys with keyboards are able to achieve if you give them enough time :)
ineitiabout 4 years ago
Did you consider something like the following to speed up the calculation? This method can go forward _really_ fast. Not sur e if it can also go backward...<p><a href="https:&#x2F;&#x2F;pzemtsov.github.io&#x2F;2015&#x2F;04&#x2F;24&#x2F;game-of-life-hash-tables-and-hash-codes.html" rel="nofollow">https:&#x2F;&#x2F;pzemtsov.github.io&#x2F;2015&#x2F;04&#x2F;24&#x2F;game-of-life-hash-tabl...</a>
评论 #26386152 未加载
atum47about 4 years ago
Some years ago I did a similar thing using genetic algorithm. I was researching it&#x27;s use in generative art.<p>Here&#x27;s a video of it in action: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;xgAigVfpIYc" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;xgAigVfpIYc</a>
risabout 4 years ago
I suspect slightly better (or faster) results would be achieved if instead of comparing against a specific dithering pattern nominated by the author, they instead compared downscaled candidate patterns against the greyscale target image.
davguerreroabout 4 years ago
This could be useful using least significant bit steganography to embed the start state and maybe a QR code as the end state, or something else able to withstand the noisy output.
beefmanabout 4 years ago
Previously: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26374009" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26374009</a>
fudged71about 4 years ago
A very interesting form of steganography.<p>Has anyone run GOL on &quot;random&quot; noise images to see if they result in any decipherable output? :)