Sunday, July 12, 2015

Coding the Conway’s Game Of Life

Written by Jonathan Paul (III MCA)
 
It was very hard to understand initially, “What is this Game of Life?”. It seemed so confusing. I was puzzled when Prof. Jibrael Jos first spoke to us about it . But then I read the four simple rules which determined the life of cells; approached sir, and he explained the life of an oscillator (Blinker). I was amazed ! It was like knife going through butter.
    I immediately got down to code it. Few if and else conditions, a little bit of concern for boundary conditions and ensure that no cells in the present generation were affected by cells of next generation ; gave me an ample of joy watching my first species oscillating on the terminal.
Then came the time to tweak the simulation. Sir asked us to discover new species. Just imagining the fact that I might find a new species in the huge ocean of the probabilistic matrix was awe-inspiring.
I wrapped the world of this simulation to allow an infinite space. Also provision for loading of discovered species into the world was given. Existing discoveries of interesting species was included in the simulation.

It was an interesting affair. I could watch these little bots moving on my screen for eternity. It has been an amazing experience coding this. And if you are interested to have fun, join the endeavor of finding new species.
 
 
 
I call this life a Village. It has a glider, blinkers which look like windmills, beehives, blocks which resemble huts, and loaves (food barn). I had fun, hope you do too.

Wiki URL : https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

 

No comments:

Post a Comment