Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Run an adaptive search for cellular automata
ResourceFunction["AdaptiveCellularAutomaton"][<|"Depth"→3|>] returns three steps in an adaptive search, starting from the 3-color null rule and searching for rules that give longer finite length patterns. | |
ResourceFunction["AdaptiveCellularAutomaton"][<|"Depth"→3, "Rule"→{0,k,r}|>] returns three steps in an adaptive search, starting from the k-color null rule and searching for rules that give longer finite length patterns. | |
ResourceFunction["AdaptiveCellularAutomaton"][evospec,"Final"] returns only the final step in the search. | |
ResourceFunction["AdaptiveCellularAutomaton"][evospec,"Breakthroughs"] returns the breakthrough steps in the search. | |
ResourceFunction["AdaptiveCellularAutomaton"][evospec,sequencespec,"Plot"] returns the plotted cellular automata for each step specified by the sequence specification. | |
ResourceFunction["AdaptiveCellularAutomaton"][evospec,sequencespec,"Fitness"] returns only the fitness values. | |
ResourceFunction["AdaptiveCellularAutomaton"][evospec,sequencespec,propertyspec] returns all the information specified by the property specification. |
| "Rule" | {0, 3, 1} | the initial rule, and the color-space and radius to use |
| "InitialCondition" | {{1}, 0} | the initial condition |
| "Cut" | 100 | the number of steps to search to determine if the rule halts |
| "Depth" | 1 | the number of iterations to do in the search |
| "MutationFunction" | 1 | the type and number of mutations to do |
| "FitnessFunction" | "Lifetime" | the fitness function to use |
| "SelectionFunction" | #1>=#2& | the selection function to use |
| "Lifetime" | evolve to a longer finite lifetime |
| "Width" | evolve to a wider pattern that still halts |
| "AspectRatio" | evolve to a larger aspect ratio defined as the width over the lifetime |
| type→target | evolve to a target value for the given fitness type |
| fun | a custom function that takes the rule and initial condition and returns the desired fitness |
| n | randomly mutate a n bits in the rule |
| "Rule" -> n | randomly mutate n bits in the rule |
| "InitialCondition" -> n | randomly mutate a single bit in the initial condition |
| fun | a custom function that takes the rule and returns the mutated version |
| <|"Rule"→funrule, "InitialCondition"→funic|> | mutates the rule and initial condition using the specified functions |
Run a search for 3 steps starting from the null k=3, r=1 rule and return every step in the search:
| In[1]:= |
| Out[1]= |
Run a search for 100 steps and only return the final result:
| In[2]:= |
| Out[2]= |
Start from the k=4,r=1 rule:
| In[3]:= |
| Out[3]= |
Evolve for 500 steps and plot the breakthrough mutation steps:
| In[4]:= |
| Out[4]= | ![]() |
Plot the progressive fitness values showing the mutations that weren't selected:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Plot the progressive fitness values for 10 evolutions:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Plot the final states of 10 different evolutions:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Evolve a k = 4 cellular automata:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Plot with a length specification:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Manually adjust the output function:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Search for longer automata:
| In[11]:= | ![]() |
| Out[11]= | ![]() |
Evolve the initial conditions of a cellular automata:
| In[12]:= | ![]() |
| Out[12]= | ![]() |
Evolve for width:
| In[13]:= | ![]() |
| Out[13]= | ![]() |
The default selection function accepts neutral mutations by default, make it so that it accepts mutations that decrease fitness by 1:
| In[14]:= | ![]() |
| Out[14]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License