Skip to content

Simple game of life simulation implemented using 2d convolutions in pytorch

Notifications You must be signed in to change notification settings

SamGalanakis/GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple game of life simulator using pytorch convolutions

Game of life

Example_1 Example_2

Start simulation and save images to boards/

python game_of_life.py --board_width 192 --board_height 108 --scale_factor 10 --n_frames 1000 --seed 0

Board height and width refers to the number of cells. Simulation is run at that resolution and then upscaled by a multiple according to scale factor. So scale_factor = 1 -> 1 pixel per cell. Seed corresponds to the pytorch seed used to generate the initial board state.

Output video from saved board images

ffmpeg must be installed and on the path.

ffmpeg -framerate 12 -i "boards/%d_board.png" video.mp4

About

Simple game of life simulation implemented using 2d convolutions in pytorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages