[Community Puzzle] Custom Game of Life

https://www.codingame.com/training/easy/custom-game-of-life

Send your feedback or ask for help here!

Created by @Edjy,validated by @thomas_lourseyre,@Alex-1 and @Fantomat75.
If you have any issues, feel free to ping them.

what is “the condition of surviving/dying?” I do not understand what you mean by that.

It is a condition that defines whether a given cell will be alive/dead in the next turn.

For example:
001100000 - alive cell survives if it has 2 or 3 alive neighbours, otherwise dies
000100000 - dead cell is ressurected if it has 3 alive neighbours, otherwise stays dead

.O.
.O.
.O.

Assuming the top left cell is [0,0]:
Dead cells at [0,1] and [2,1] have 3 alive neighbours so they are brought back to life in next turn.
Alive cells at [1,0] and [1,2] have 1 alive neighbour so they die.
Alive cell at [1,1] has 2 alive neighbours so it stays alive.
All cells in corners are dead and have 2 alive neigbours so they stay dead.

Grid on next turn:

...
OOO
...
1 Like

Hi thanks for the quick answer. I think I phrased my answer poorly… I meant how do you get from “001100000” to 2-3 alive neighbors, survives.

However, I think I just figured it out on second glance. Am I correct in saying the first digit is if 0 neighbors alive, second is if 1 neighbor is alive, third is if 2, 4th is if 3… etc. and 0 = die/stay dead, 1 = birth/survive?

Yes, as per instructions :slight_smile:

The index within the line is the number of neighbours, 0 to 8

001100000
1s are on indexes 2 and 3 so rule applies if cell has 2 or 3 neighbours.

1 Like