Python.Rhino.GH Bidimensional Array with Full print 1 empty print 0

Hello !!

During this time at home I want to Learn/Use Python in Rhino/Grasshopper to create “Loop” like Life of Convey.

It’s my first time using Python I watched a lot of video on YouTube and course on Scribbs but I feel very dumb watching my Rhino.Python editing and trying to do a True/False test. I definitely need some help

If you guys have some time to share with me your knowledge I would appreciate it :slight_smile:

My final work / experimentation consist to create a “Grid” 50x50 filled by square 1x1 and them put predetermining square the grid automatically like the game of life.

At the moment I am trying to make the grid work and then put manually a square on it to see if the area outside the square “empty” are full of TextTag “0” and inside the square full of TextTag “1”

At the moment I just made the grid on Grasshopper and saw some other references like

Hi @valentin.cocq,

If you want to learn Python, I highly recommend the free Codecademy interactive course. It should cover the basics pretty well and you can comb through it in a couple of days, if you’re motivated.

The Game of Life has been implemented by a lot of people already in all sorts of ways:

If you understand how the Game of Life works, you’ll also understand how to feed it a predefined initial state of alive and dead cells (i.e. 0 and 1).

You could use @laurent_delrieu’s approach to randomly define the initial state of the Game of Life (the starting game board).
Here’s a rough, quick Python translation of what Laurent did in C#. (8.8 KB)