Game of Life
Last updated
Last updated
In the associated Python file, you can run the Game of Life, written in Concrete Python.
In addition to Concrete, you must install pygame
in your virtual environment:
pip3 install pygame
Once done, if you go to frontends/concrete-python/examples/game_of_life
, python game_of_life.py --help
should give you the manpage:
Then, you can play with the different options, and in particular:
dimension
, to chose the size of the grid; the larger, the slower
method
, to chose which implementation is used for the grid update
log2_global_p_error
and log2_p_error
, to chose the probability of correctness (see the Concrete documentation for more information)
simulate
, to do computations only in simulation, i.e., not in FHE
In simulation: python3 game_of_life.py --dimension 100 --refresh_every 50 --simulate
In FHE: python3 game_of_life.py --dimension 6 --refresh_every 8 --log2_p_error -40 --method method_4b
A blog is currently in the process of being written, and a link will be added here when it's available. In the meantime, some explanations are given in the code.