Changeset 12576 for branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKBitFlipMoveEvaluator.cs
- Timestamp:
- 07/02/15 15:36:04 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKBitFlipMoveEvaluator.cs
r12569 r12576 61 61 int seed = InteractionSeedParameter.ActualValue.Value; 62 62 double moveQuality = QualityParameter.ActualValue.Value; 63 int q = QParameter.ActualValue.Value; 64 double p = PParameter.ActualValue.Value; 63 65 64 66 List<int> affectedFitnessComponents = new List<int>(); … … 71 73 if (affectedFitnessComponents.Count * 2 > interactions.Columns) { 72 74 double[] f_i; 73 moveQuality = NKLandscape.Evaluate(moved, interactions, weights, seed, out f_i );75 moveQuality = NKLandscape.Evaluate(moved, interactions, weights, seed, out f_i, q, p); 74 76 } else { 75 77 long x = NKLandscape.Encode(binaryVector); … … 78 80 double[] w = NKLandscape.Normalize(weights); 79 81 foreach (var c in affectedFitnessComponents) { 80 moveQuality -= w[c % w.Length] * NKLandscape.F_i(x, c, g[c], seed);81 moveQuality += w[c % w.Length] * NKLandscape.F_i(y, c, g[c], seed);82 moveQuality -= w[c%w.Length]*NKLandscape.F_i(x, c, g[c], seed, q, p); 83 moveQuality += w[c%w.Length]*NKLandscape.F_i(y, c, g[c], seed, q, p); 82 84 } 83 85 }
Note: See TracChangeset
for help on using the changeset viewer.