This started as a challenge on the Rosetta Code page, but I wanted it to be more general - allowing different sized grids and scenarios.
Based the 1970 game by John Conway, this game takes a specified population of villagers (green dots) who live in yurts (grey dots) and applies these rules:
any villager (green dot) surrounded by less than 2 or more than 3 villagers perishes
when an empty yurt (gray dot) is surrounded by exactly 3 villagers, a villager is born