Zindagi - A tool to create cellular automata for web

For general discussion about Conway's Game of Life.
Post Reply
TBking
Posts: 2
Joined: November 4th, 2020, 8:37 am

Zindagi - A tool to create cellular automata for web

Post by TBking » November 6th, 2020, 1:19 pm

Hi all,

I am relatively new to Cellular Automata. Like many others I was sucked into it by Conway's Game Of Life. The more things I am finding, the more interesting it gets. However what I didn't found an easy way to programmatically create cellular automata in JavaScript. There were some, but not what I needed, so I created one.

Image

Zindagi ("life" in Hindi) is an npm module which takes a life-like rule set and an initial state as input and provides capability to run through generations and even render these generations in terminal/browser console. It is not as advanced and fast as Golly and doesn't support Hashlife (YET), but it's far more accessible to the average developer and is easy to get started.

I would love to hear feedback and must-have or good-to-have things to add to the library. Creating this library has been a learning process for me and I hope I'll learn more through the feedback I get from here.

Github: https://github.com/tarunbatra/zindagi/
Docs: https://tarunbatra.com/zindagi/


PS: The logo above is made using the library itself.

carsenal
Posts: 3
Joined: November 17th, 2020, 5:36 pm

Re: Zindagi - A tool to create cellular automata for web

Post by carsenal » November 17th, 2020, 5:41 pm

It's a really interesting project!

Have you considered moving calculation over to webgl? GOL is perfect for gpus, it can make a huge difference in computation speed.

TBking
Posts: 2
Joined: November 4th, 2020, 8:37 am

Re: Zindagi - A tool to create cellular automata for web

Post by TBking » November 18th, 2020, 4:34 pm

I knew the current implementation which is basically 2 for loops are not going to be competitive in any form, so I added an "algorithm" option in the library for future use, for instance HashLife.
Have you considered moving calculation over to webgl?
I haven't looked into webgl, but I will now. On first look, it seems like something that will work only in browser. The current library supports Node.js too. But worth a look, thanks!

Post Reply