From: Florian Forster Date: Wed, 11 Mar 2009 10:50:52 +0000 (+0100) Subject: src/sn-evolution2.c: Make mutations more likely. X-Git-Tag: v1.0.0~78 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1449a1da915823283ac33c6a3a8a7c5a057677ef;p=sort-networks.git src/sn-evolution2.c: Make mutations more likely. --- diff --git a/src/sn-evolution2.c b/src/sn-evolution2.c index b5beca4..07c33a2 100644 --- a/src/sn-evolution2.c +++ b/src/sn-evolution2.c @@ -255,7 +255,7 @@ static int mutate_network (sn_comparator_t *comparators, int comparators_num) int i; for (i = 0; i < comparators_num; i++) - if (sn_bounded_random (0, 1000) == 0) + if (sn_bounded_random (0, 1000000) >= 972655) comparators[i] = get_random_comparator (); return (0); @@ -349,8 +349,7 @@ static int create_offspring (void) } - if (sn_bounded_random (0, 1000) == 0) - mutate_network (n_comparators, n_comparators_num); + mutate_network (n_comparators, n_comparators_num); n = sn_network_create (inputs_num); for (i = 0; i < n_comparators_num; i++)