Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/15 15:36:04 (9 years ago)
Author:
epitzer
Message:

#2306 Implement NKq and NKp landscape (and fix Seed parameter clash with Algorithm's seed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKBitFlipMoveEvaluator.cs

    r12569 r12576  
    6161      int seed = InteractionSeedParameter.ActualValue.Value;
    6262      double moveQuality = QualityParameter.ActualValue.Value;
     63      int q = QParameter.ActualValue.Value;
     64      double p = PParameter.ActualValue.Value;
    6365
    6466      List<int> affectedFitnessComponents = new List<int>();
     
    7173      if (affectedFitnessComponents.Count * 2 > interactions.Columns) {
    7274        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);
    7476      } else {
    7577        long x = NKLandscape.Encode(binaryVector);
     
    7880        double[] w = NKLandscape.Normalize(weights);
    7981        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);
    8284        }
    8385      }
Note: See TracChangeset for help on using the changeset viewer.