Skip to content

Commit c743f20

Browse files
authored
Merge pull request #141 from Happy-Algorithms-League/doc/fix_README
Fix README: primitives are tuple, not list
2 parents 2a89acf + 6c717f4 commit c743f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Cartesian genetic programming (CGP) in pure Python.
1313

1414
This library implements Cartesian genetic programming (e.g, Miller and Thomson, 2000; Miller, 2011) for symbolic regression in pure Python, targeting applications with expensive fitness evaluations. It provides Python data structures to represent and evolve two-dimensional directed graphs (genotype) that are translated into computational graphs (phenotype) implementing mathematical expressions. The computational graphs can be compiled as a Python functions, SymPy expressions (Meurer et al., 2017) or PyTorch modules (Paszke et al., 2017). The library currently implements an evolutionary algorithm, specifically (mu + lambda) evolution strategies adapted from Deb et al. (2002), to evolve a population of symbolic expressions in order to optimize an objective function.
1515

16-
<div style="text-align:center"><img src="cgp-sketch.png" alt="CGP Sketch" width="600"/></div>
16+
<div style="text-align:center"><img src="https://raw.githubusercontent.com/Happy-Algorithms-League/hal-cgp/master/cgp-sketch.png" alt="CGP Sketch" width="600"/></div>
1717

1818
<sub>Figure from Jordan, Schmidt, Senn & Petrovici, "Evolving to learn: discovering interpretable plasticity rules for spiking networks", [ arxiv:2005.14149](https://arxiv.org/abs/2005.14149).</sub>
1919

@@ -51,7 +51,7 @@ genome_params = {
5151
"n_columns": 10,
5252
"n_rows": 2,
5353
"levels_back": 5,
54-
"primitives": [cgp.Add, cgp.Sub, cgp.Mul, cgp.Div, cgp.ConstantFloat],
54+
"primitives": (cgp.Add, cgp.Sub, cgp.Mul, cgp.Div, cgp.ConstantFloat),
5555
}
5656

5757
ea_params = {"n_offsprings": 10, "n_breeding": 10, "tournament_size": 2, "n_processes": 2}

0 commit comments

Comments
 (0)