This project is a plugin script for the Golly simulator, allowing users to generate digital circuits in Conway's Game of Life by inputting Boolean functions. The circuit components are based on the designs by Nicholas Carlini, as shared in his article from April 1, 2020.
English document | 中文文檔
This script acts as a plugin for the Golly simulator for Conway's Game of Life. By inputting a Boolean function, it generates a corresponding digital circuit within the Game of Life.
Here's an example of the generated output: The top label represents the name of the combinational circuit, the middle shows the generated result, and the bottom showcases the input Boolean function.
(Note: If you wish to export images from Golly, you can refer to golly-save-image).
Before starting, you need to have the Golly simulator installed. If you've already got this set up, you can skip this step.
You can download the Golly simulator from sourceforge. After downloading, unzip the package. You will find a folder named 'golly' containing 'golly.exe', which is the Golly simulator.
Inside the 'golly' folder, there's a sub-folder named 'scripts'. This is where plugins or scripts for Golly are stored.
Golly supports plugins written in either Python or Lua. For this project, we're using Python. Therefore, place the files of this project inside the 'python' folder within 'scripts'.
With that done, you're ready to use the plugin.
The execution process is in two steps:
- Execute generateLayout.py using Python. While running this script, you'll need to input the Inputs, Outputs, and the Boolean Function. You can check out the example for reference.
- In Golly, run putObjs.py to place the circuit within the simulator.
Once done, Golly will display the generated digital circuit based on the Boolean function you provided.