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.

Show HN: Simulate 2^100 live automata cells in milliseconds, in your browser

13 pointsby ekzhangalmost 5 years ago

1 comment

ekzhangalmost 5 years ago
Some time ago I learned about the Hashlife algorithm, which computes the time-evolution of a pattern in Conway&#x27;s game of life in time <i>logarithmic</i> in the dimensions and number of iterations, given enough structure. This seems pretty amazing to me - you can simulate a ridiculous amount of cells without much computational power at all.<p>The standard Game of life viewer is called Golly, and it also uses this algorithm. However, I was curious as to whether I could implement it effectively in the browser - and this is the result (the answer is yes!).<p>Recommended: Select some large patterns (such as &quot;Turing machine&quot; or &quot;Breeder 1&quot;) in the website, increase the speed and step size, and watch the magic happen.<p>This experiment has a custom Hashlife implementation in JavaScript, with an interface made using Vue and a browser canvas. The code is available at <a href="https:&#x2F;&#x2F;github.com&#x2F;ekzhang&#x2F;game-of-life" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ekzhang&#x2F;game-of-life</a>.
评论 #23323691 未加载