Page 1 of 1

Combinator Game of Life

Posted: Fri Jul 24, 2015 10:55 am
by DaveMcW
Image

I built a factory that plays Conway's Game of Life.

The game has three simple rules that govern cell life cycle.
  • if neighbors = 3, then cell is born
  • if neighbors = 2, then cell does not change
  • if neighbors = anything else, then cell dies
That is easy to simulate, but I want to make it even easier. So I subtract 1 from both sides.
  • if (neighbors - 1) = 2, then cell is born
  • if (neighbors - 1) = 1, then cell does not change
  • otherwise, cell dies
The rewritten rules are simple enough to program in two decider combinators.

Image

With the rules in place, I can build a complete cell.

Image

I use 4 arithmetic combinators, to prevent neighbor cell wires from touching. Only one of them is actually used to subtract 1. They are spaced far apart to be able to reach all 8 neighbor electric poles.

Since I use wires of both colors to connect to neighbors, I need to alternate the primary color of each cell. The final blueprint is a checkerboard pattern.

Image
Blueprint String
It runs at 2 ticks per frame, or 30 Hz.

Setting the initial pattern using combinators would be a nightmare, so I use the console. You need to run the setup program twice. The first run sets the pattern, the second run starts the simulation.
Setup Program
Here is the save file with the final factory.
Game-of-Life.zip
(4.6 MiB) Downloaded 624 times

Re: Combinator Game of Life

Posted: Fri Jul 24, 2015 12:36 pm
by Choumiko
Just freaking wow! :o :D

Re: Combinator Game of Life

Posted: Fri Jul 24, 2015 2:11 pm
by Lupoviridae
Beautiful and well done! I was planning on building a GoL in my world but you beat me to it :D

Re: Combinator Game of Life

Posted: Fri Jul 24, 2015 2:51 pm
by DRE
THIS has began.
And it will not stop until someone creates full x86 CPU emulation XD

Re: Combinator Game of Life

Posted: Sun Jul 26, 2015 10:28 pm
by Stickman
So where's the gifv or the video?

Re: Combinator Game of Life

Posted: Sun Jul 26, 2015 11:45 pm
by Gandalf
Dude I wanna hug you so hard right now!

So when are you gonna implement hashlife? x)

Re: Combinator Game of Life

Posted: Wed Jul 29, 2015 7:16 pm
by Lee_newsum
well that is v good, i playing with in une..... :geek: i had so thorts can you pull the config from Smart chest, 1 Smart chest for each cell. and you can have a reseat chest, would that work?

as for an input system you can use "z" to put an item down if you put were an Inserter can get it and put it in a chest, you have a in put system :D :geek:

Re: Combinator Game of Life

Posted: Wed Jul 29, 2015 7:36 pm
by Zhab
Very impressive.

Re: Combinator Game of Life

Posted: Mon Aug 03, 2015 4:50 am
by Adil
You sir are amazing.

Re: Combinator Game of Life

Posted: Tue Aug 04, 2015 1:24 pm
by aka13
Impressive, very nice!