Skip to content

Commit f079918

Browse files
Added circuit evolution example (uses PySpice).
1 parent 7f8af7c commit f079918

File tree

3 files changed

+713
-0
lines changed

3 files changed

+713
-0
lines changed

examples/circuits/config

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[NEAT]
2+
max_fitness_threshold = -0.05
3+
pop_size = 100
4+
reset_on_extinction = False
5+
6+
[CircuitGenome]
7+
# component type options
8+
component_default = resistor
9+
component_mutate_rate = 0.1
10+
component_options = resistor diode
11+
12+
# component value options
13+
value_init_mean = 3.0
14+
value_init_stdev = 0.1
15+
value_max_value = 9.0
16+
value_min_value = 0.0
17+
value_mutate_power = 0.5
18+
value_mutate_rate = 0.7
19+
value_replace_rate = 0.1
20+
21+
# genome compatibility options
22+
compatibility_disjoint_coefficient = 1.0
23+
compatibility_threshold = 3.0
24+
compatibility_weight_coefficient = 1.0
25+
26+
# connection add/remove rates
27+
conn_add_prob = 0.5
28+
conn_delete_prob = 0.5
29+
30+
# connection enable options
31+
enabled_default = True
32+
enabled_mutate_rate = 0.01
33+
34+
# node add/remove rates
35+
node_add_prob = 0.2
36+
node_delete_prob = 0.2
37+
38+
# network parameters
39+
num_inputs = 1
40+
num_outputs = 1
41+
42+
[DefaultStagnation]
43+
species_fitness_func = max
44+
max_stagnation = 20
45+
46+
[DefaultReproduction]
47+
elitism = 2
48+
survival_threshold = 0.2
49+

0 commit comments

Comments
 (0)