Forexample, it's quitepossibletosetup a patternwherethelittlecritterswillmovearound, implements a fullyfunctionalcomputer, a memberofthepatternswhichcouldemulatecircuits.
Butfundamentally, thewholephenomenastemsfromverysimplerules, and I meanverysimplerules.
Andthisiswhyit's suchaninterestingalgorithm.
Howdoyougetallofthiscomplex?
Wecallitemergentbehavioroutofsuch a simpleruleset.
Sohowdowemakesillylittletomato?
Well, thefirstthingyou'regoingtoneedis a grid, andinthiscase I'm using a twodimensionalgridoffsquareswhere a cellisdirectlyconnectedtoitsimmediateneighbors.
Everycellinthegridexecutes a program, andalloftheseprogramsareidentical, buttheyoperateonlocaldata.
Eachcellcontains a memorywhichcanbeusedtostoreitscurrentstateandforgameoflife.
Allofthecellsrun a program, buttheyallrunthesameprogramandtheyallrunthesameprogramsynchronizedwitheachother.
Thisgiveswaytothe S I m d paradigmsingleinstruction, multipledatawhere a singleinstructionisbroadcastacrossthewholeprocessingarray, butitusesitslocaldatatooperateon.
Sothis s I M D approach.
Coupledwith a neighbor.
Communicationgivesrisetocellularwatermatter.
Theprogramforgameoflifeisverysimple.
Stepone, wecountourneighbors.
Solet's assume I amthiscellinthemiddlehereon.
I havesomealiveneighbors.
When I wasgoingtobeindicatedbyreddots.
Wecanonlytalktotheneighborsinourimmediatevicinity, sothisgivesus a threebythreesquarearoundtheactivecell, andwecancounthowmanyreddotsareinthissquare.
Sointhiscase, it's three.
Now.
Thisiswhereweintroducesomeverysimplerules.
Let's considertherules.
Whenthestyleisalive, I'IIitsoutput.
It's settoeone, soit's gotbluedotorit's a reddaughter.
Otherwise, thecellhas a goodnumberofneighbors, andit's happywe'llput a smileyfaceonanditstaysalive.
Nowlet's consider a deadcell.
It's notoutputtinganything, butintheweirdworldofJohnConway, if a cellhasthreeneighborsandit's dead, thosethreeneighborsgettogetherandproduce a livingcell.