Skip to content

Conversation

@sakrobinson
Copy link
Contributor

Description:
This PR introduces the ability to handle 2D cellular automata rulesets in addition to the existing 1D rulesets. The changes are designed to be backward compatible, ensuring that existing functionality with 1D rulesets remains unaffected.
Changes:

  1. Updated Rulesets: Two separate dictionaries have been created for 1D and 2D rulesets in bt_automata/utils/rulesets.py. This allows for easy extension of the codebase with new rules and dimensions in the future. Rulesets for various 2D automata added. Initial conditions expanded and converted to a class.
  2. Validator Class: The get_random_params method in the Validator class (neurons/validator.py) has been updated to generate initial states for both 1D and 2D cellular automata using the InitialConditions class.
  3. Simulation Execution: The forward method in the Validator class and the get_rewards function in reward_funcs.py have been updated to select the appropriate simulation class (Simulate1D or Simulate2D) based on the rule's dimension.
  4. Miner Class: The forward method in the Miner class (neurons/miner.py) has been updated to accommodate both 1D and 2D rulesets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants