Skip to content

Commit 6563d87

Browse files
committed
Changed random weight deltas to be gaussian with a sigma of 0.01 instead of 0.1. This matches SharpNEAT 2.x. The intention for the SharpNEAT 4.0 release was to keep parameters such as these identical to SharpNEAT 2.x, so that the core neuroevolution algorithm is as close as possible between the two versions, despite the big architectural overhaul.
This allows us to compare the performance/efficacy of 2.x and 4.x, to give some assurance that there isn't some bug/flaw in the 4.x code base that impacts performance. Future releases can then be free to explore tuning of hyper parameters and such, once we have established that 4.x performs at least as well as 2.x.
1 parent 3424bba commit 6563d87

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: src/SharpNeat/Neat/NeatPopulationFactory.cs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ private NeatPopulationFactory(
6060
_innovationIdSeq = new Int32Sequence(nextInnovationId);
6161

6262
// Init random connection weight source.
63+
// TODO: Consider using gaussian samples here. One of the big leaps in backpropagation learning was related to avoiding large connection weights in the initial random weights.
6364
_connWeightDist = UniformDistributionSamplerFactory.CreateStatelessSampler<T>(_metaNeatGenome.ConnectionWeightScale, true);
6465
}
6566

Diff for: src/SharpNeat/Neat/Reproduction/Asexual/WeightMutation/WeightMutationSchemeFactory.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public static WeightMutationScheme<double> CreateDefaultScheme(double weightScal
3535
probabilityArr[0] = 0.5985;
3636
probabilityArr[1] = 0.2985;
3737
probabilityArr[2] = 0.0985;
38-
strategyArr[0] = CreateCardinalGaussianDeltaStrategy(1, 0.1);
39-
strategyArr[1] = CreateCardinalGaussianDeltaStrategy(2, 0.1);
40-
strategyArr[2] = CreateCardinalGaussianDeltaStrategy(3, 0.1);
38+
strategyArr[0] = CreateCardinalGaussianDeltaStrategy(1, 0.01);
39+
strategyArr[1] = CreateCardinalGaussianDeltaStrategy(2, 0.01);
40+
strategyArr[2] = CreateCardinalGaussianDeltaStrategy(3, 0.01);
4141

4242
// Reset mutations. 1, 2 and 3 connections respectively.
4343
probabilityArr[3] = 0.015;

0 commit comments

Comments
 (0)