projects
/
sort-networks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
src/sn-evolution.c: Don't mutate large networks.
[sort-networks.git]
/
src
/
sn-evolution.c
diff --git
a/src/sn-evolution.c
b/src/sn-evolution.c
index
9ceff88
..
62b01eb
100644
(file)
--- a/
src/sn-evolution.c
+++ b/
src/sn-evolution.c
@@
-248,7
+248,7
@@
static int create_offspring (void)
assert (SN_NETWORK_INPUT_NUM (n) == inputs_num);
- if (
sn_bounded_random (0, 100) <= 1
)
+ if (
(SN_NETWORK_INPUT_NUM (n) <= 16) && (sn_bounded_random (0, 100) <= 1)
)
mutate_network (n);
population_insert (population, n);