Skip to content

Commit

Permalink
Add "Divide by 2" rules
Browse files Browse the repository at this point in the history
  • Loading branch information
be-next committed Dec 29, 2023
1 parent 2e8f765 commit 0dbddc1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/example_06/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"num_states": 5,
"num_cells": 12,
"world_initialisation" : "0 0 1 1 1 1 1 1 1 1 0 0",
"rules_file_name": "examples/example_06/rules.json"
}
26 changes: 26 additions & 0 deletions examples/example_06/rule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "Divide by 2",
"num_states": 5,
"rules": [
{"neighborhood": [5, 0, 0], "next_state": 0},
{"neighborhood": [0, 1, 1], "next_state": 2},
{"neighborhood": [2, 1, 1], "next_state": 2},
{"neighborhood": [2, 2, 1], "next_state": 1},
{"neighborhood": [2, 1, 0], "next_state": 3},
{"neighborhood": [1, 2, 3], "next_state": 0},
{"neighborhood": [1, 0, 3], "next_state": 3},
{"neighborhood": [0, 3, 0], "next_state": 0},
{"neighborhood": [0, 3, 3], "next_state": 0},
{"neighborhood": [3, 0, 3], "next_state": 3},
{"neighborhood": [0, 2, 3], "next_state": 4},
{"neighborhood": [4, 3, 3], "next_state": 4},
{"neighborhood": [4, 3, 0], "next_state": 0},
{"neighborhood": [4, 4, 0], "next_state": 1},
{"neighborhood": [4, 4, 1], "next_state": 1},
{"neighborhood": [0, 4, 1], "next_state": 1},
{"neighborhood": [0, 4, 0], "next_state": 1},
{"neighborhood": [0, 1, 0], "next_state": 0},
{"neighborhood": [2, 1, 3], "next_state": 3},
{"neighborhood": [1, 3, 0], "next_state": 0}
]
}

0 comments on commit 0dbddc1

Please sign in to comment.