Free cookie consent management tool by TermsFeed Policy Generator

source: branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKMoveEvaluator.cs @ 12394

Last change on this file since 12394 was 7128, checked in by epitzer, 13 years ago

#1696 Integrate fitness landscape analysis plugins from Heureka! repository.

File size: 2.4 KB
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3using HeuristicLab.Data;
4using HeuristicLab.Encodings.BinaryVectorEncoding;
5using HeuristicLab.Operators;
6using HeuristicLab.Optimization;
7using HeuristicLab.Parameters;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9
10namespace HeuristicLab.Problems.NK {
11
12  [Item("NKMoveEvaluator", "A base class for operators which evaluate moves on the NK Lanscape.")]
13  [StorableClass]
14  public abstract class NKMoveEvaluator : SingleSuccessorOperator, INKMoveEvaluator, IMoveOperator, IBinaryVectorMoveOperator {
15
16    public ILookupParameter<DoubleValue> QualityParameter {
17      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
18    }
19    public ILookupParameter<DoubleValue> MoveQualityParameter {
20      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
21    }
22    public ILookupParameter<BinaryVector> BinaryVectorParameter {
23      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
24    }
25    public LookupParameter<BoolMatrix> GeneInteractionsParameter {
26      get { return (LookupParameter<BoolMatrix>)Parameters["GeneInteractions"]; }
27    }
28    public LookupParameter<IntValue> InteractionSeedParameter {
29      get { return (LookupParameter<IntValue>)Parameters["InteractionSeed"]; }
30    }
31    public LookupParameter<DoubleArray> WeightsParameter {
32      get { return (LookupParameter<DoubleArray>)Parameters["Weights"]; }
33    }
34
35    [StorableConstructor]
36    protected NKMoveEvaluator(bool deserializing) : base(deserializing) { }
37    protected NKMoveEvaluator(NKMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
38    protected NKMoveEvaluator()
39      : base() {
40      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a OneMax solution."));
41      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a OneMax solution."));
42      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The solution as BinaryVector."));
43      Parameters.Add(new LookupParameter<BoolMatrix>("GeneInteractions", "Matrix indicating gene interactions."));
44      Parameters.Add(new LookupParameter<IntValue>("InteractionSeed", "Seed used for randomly generting gene interactions."));
45      Parameters.Add(new LookupParameter<DoubleArray>("Weights", "The weights for the component functions. If shorter, will be repeated."));
46    }
47  }
48}
Note: See TracBrowser for help on using the repository browser.