Skip to content

Simulator of GOL(Game of Life) written with Python on both cpu and gpu(cuda)

Notifications You must be signed in to change notification settings

HellOwhatAs/GOL_Simulator

Repository files navigation

GOL_Simulator

Simulator of GOL(Game of Life) with Python on both cpu and gpu(cuda)

Install

pip install GOL_Simulator

Usage

If numba.cuda is avaliable for you, use from GOL_Simulator.gpu import Simulator (or cpu if you like it).
Otherwise you can use from GOL_Simulator.cpu import Simulator only.
(all API are the same between gpu and cpu)

Examples

run cpu_example.py to get cpu_result.png which is a randomly (with all cells 95% probability to be dead and 5% to be alive) initialized 1000x1000 state after 200 iterations.

run gpu_example.py to get gpu_result.png which is the state in cpu_result.png (actually it reads the state from this picture) after another 2000 iterations.

About

Simulator of GOL(Game of Life) written with Python on both cpu and gpu(cuda)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages