HashLife

From LifeWiki
Revision as of 19:59, 11 July 2017 by Apple Bottom (talk | contribs) (Pilfered an explanation of Dvgrn's over on the forums -- hope you don't mind!)
Jump to navigation Jump to search

HashLife is an algorithm created by Bill Gosper in 1984 for simulating the Game of Life. It is designed to take advantage of the considerable amount of repetitive behaviour in many large patterns of interest.[1]

Roughly speaking, the idea of the algorithm is to store subpatterns in a hash table so that the results of their evolution don't have to be recomputed if they arise again at another place or time: 2N+1×2N+1 tiles are run 2N-1 ticks into the future, and the 2N×2N centers are stored and re-used without recalculating them, whenever the same large hashtiles show up again. This works because information cannot travel faster than the speed of light: it is impossible for anything outside of the large tile to affect the center area in that amount of time.[2]

This does, however, mean that complex patterns can require substantial amounts of memory. HashLife provides a means of evolving repetitive patterns millions (or even billions or trillions) of generations further than normal Life algorithms such as QuickLife can manage in a reasonable amount of time. It is not, generally, suitable for showing a continuous display of the evolution of a pattern, because it works asynchronously — at any given moment it will usually have evolved different parts of the pattern through different numbers of generations. Nonetheless, some Life simulation programs do have a HashLife mode, the most well-known example being Golly.

References

  1. R. Wm. Gosper, Exploiting Regularities in Large Cellular Spaces. Physica 10D (1984) 75-80.
  2. Dave Greene (July 11, 2017). "Re: Larger than Life". ConwayLife.com forums. Retrieved on July 11, 2017.

External links

Template:LinkWeisstein