Use Game of Life to Generate 256 bit Hash

One of the most fascinating aspects of Game of Life is that it illustrates so well how a completely deterministic process can be so unpredictable. Use a fixed starting pattern and run. Watch the result. Use the same starting pattern but change a single cell somewhere. The new result can be as different from the old as night and day.

Absolute determinism plus unpredictability are precisely the two things you look for in a hash algorithm. When you store passwords on a server you don’t store the passwords themselves but their hashes, calculated using some hash algorithm like for example MD5, SHA-256 or Whirlpool.

A user authenticating himself on the server inputs his password and the server hashes the password to see if the hash corresponds to the hash stored on the server.

For a hacker getting hold of the stored hashes, or for the system administrator, there is no way to run the hash algorithms backwards to retrieve the real passwords. The only way to break a hash is to systematically hash every possible password (out of zillions) and see if the hash matches.

I made this Javascript application to illustrate the idea of using Game of Life to generate hash values. The application is not using Conways standard B3/S23-rules but instead B23/S23-rules.

Try to hash different words or sentences differing only by a single letter adjacent in the alphabet and watch how the hash value changes. You can also try to hash some text but before you click on the ”Run 200 steps” click somewhere on the gird with the mouse pointer to change a single bit.


Game of Life with B345/S45 rules

A lot of people are familiar with British mathematician John Horton Conway’s ”Game of Life” – an algorithm to simulate cellular growth and decay, first published in Scientific American in 1970.

The concept is simple. Imagine an infinite grid of empty squares. Each of these squares can either be empty or occupied by a ”cell”. The are only two rules. One rule for empty squares (the birth rule) and one rule for squares occupied by a cell (the survival rule).

Birth: If an empty square has exactly three neighboring cells a new cell is born in that square.
Survival: An existing cell will only survive if it has either two or three neighbors.

These two rules implies a time axis along which the grid will project forward in discrete phases.

But why do we have these specific rules? Why is exactly three neighbors required to give birth to a new cell?

Conway’s classical rules are sometimes abbreviated to the code B3/S23.

The reason for these particular rules to have become so popular isn’t that strange. Anyone who has experimented with a simulation engine using these rules knows that they often create very complex and interesting situations.

But this being a fact doesn’t exclude the possibility of other rules also having the potential of creating complex and interesting scenarios.

Conway himself and others have explored a lot of other possible rules for Birth and Survival.

I played around two days ago with my own javascript-powered game of life engine where I can chose any set of rules for birth and survival. I wanted to explore an idea I had to use the game of life cellular automaton concept to create a cryptographic hashing algorithm. So, by a mere coincidence, I tried the B345/S45 rules and was fascinated by the way that an initial small colony of cells transformed during hundreds of phases only to later die out. This was almost always the fate that awaited small colonies occupying an initial eight times eight square. I tried out new random shaped colonies, one after another and very seldom a shape would pop up that wouldn’t die out but instead grow and grow and never stop growing. How come, I wondered?

I dealt with this question systematically and found out that there are only 36 symmetrical shapes out of a total of 37888 that will grow indefinitely. All the other symmetrical 8×8-shapes will eventually be either totally annihilated or get stuck in small for ever repeating loops of shapes (so called pulsars).

Here is the total set of miracle seeds – the smallest possible symmetrical shapes that I found that will grow forever. All the tens of thousands of others are destined to perish or stagnate.


I have shown that there exist no smaller symmetrical shapes, for example 7×7-shapes or 6×6-shapes, that will grow indefinitely.

Add or remove a single pixel anywhere and they will die – that’s how sensitive they are (try it out for yourself).

So these are the symmetrical ones. What about the asymmetrical ones?

I don’t know, but I guess that you can’t find an asymmetrical shape smaller that 8×8 that will grow indefinitely.

It could be tested systematically but the number of all shapes that occupy a maximum space of 8 times 8 squares are much larger than just the symmetrical ones.

Click on this link or on the picture above to go to my B345/S45 simulation engine.

Update: July 28 2015

Amazing news. After seventeen hours of automatic testing of random shaped populations eight different asymmetric 8×7 indefinite growers presented themselves!

8x7 grower 8x7 grower 2 8x7 grower 3 8x7 grower 4 8x7 grower 5 8x7 grower 6 8x7 grower 7 8x7 grower 8

I  also found three shapes that lasted a long time but in the end didn’t quite make it.

8x7 lasted 539 8x7 lasted 542 8x7 lasted 716

They lasted 539, 542 and 716 (!) rounds respectively.

Evil Bible Discussion Forum I sometimes encounter the idea that engaging in philosophy is an activity of the past or that the subject of philosophy is mainly about studying what ancient bearded greek men draped in white linen said to one another. As a philosophy teacher I find it interesting to challenge that idea.

One of the best ways to show that philosophy plays a practical role today is to point to the fact that philosophical discussions are going on in forums all over the internet. People engage their heart and soul right now in discussions about ethics, political philosophy, theory of knowledge, philosophy of science, philosophy of language. One of my favorite examples of philosophical discussions where people tend to be über-passionate is discussions concerning belief in God versus atheism and materialism. is a website that used to have a forum bustling with animated discussions that made a big impression on me. That forum is now closed an unavailable but I’d like to publish some excerpts to show what the discussions could look like…

evilbible.icon God commands murder and rape, and the Moses salutes…

evilbible.icon Biased – and a few mistakes

evilbible.icon I am a christian pondering why this site exists.

evilbible.icon Atheism = A Leap of Faith? Pt. 2

evilbible.icon Why did it take 7 days?

evilbible.icon A response to an essay about atheists

Sam Harris’ Atheism is the New Buddhism

I think it’s amazing to realize as to what extent Sam Harris atheism coincides in all relevant aspects with the essence of Siddhārtha Gautama’s message. Watch this lecture.

Wasn’t Shakyamuni’s main focus self realization by understanding the workings of mind and consiousness and getting rid of religions’s dead weight of mythology and metaphysics?  Isn’t that pretty close to what Sam Harris is up to?


Hjääälp! Islam tar över Sverige! Rösta högerpopulistiskt 2014. Ut och demonstrera mot Islam. KÄMPA!


Hjääälp! Nazismen tar över Sverige! Rösta vänsterpopulistiskt 2014. Ut och demonstrera mot Nazismen. KÄMPA!


Pupulism får allt mer plats i media. Framför allt så älskar media att polarisera. Det politiska mittfältet är tråkigt. Det är roligare att återge och filtrera omvärldens händelser med populistiska glasögon.

Just nu håller jag på med ett moment i min filosofikurs där jag försöker göra studenterna medvetna om ”narrativ”. Det finns säkert de som tycker att begreppet narrativ blivit lite uttjatat av postmoderna franska filosofer men jag tycker ändå att det är väldigt användbart.

Massmedias rapportering blir nästan alltid vinklad eftersom önskan att bygga upp olika narrativ är så stark.

Jag läste ett så bra citat häromdagen…


Det handlar om begreppet islamofobi och citatet är insiktsfullt men det fina är att det går att tillämpa analogt på väldigt mycket av den terminologi som skapas i den populistiska diskursen.

Personer som vi (något drastiskt) kan kalla fascister (d.v.s. antiliberaler) som vill strypa det fria ordet, skapar etiketter, definitioner och narrativ som svartmålar, misstänkliggör och brännmärker. Fega människor i ledande ställning (chefredaktörer, journalister) vågar inte ifrågasätta dessa narrativ utan spelar med och använder dessa ord för att manipulera den stora naiva massan.