using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Encodings.BinaryVectorEncoding; using HeuristicLab.Operators; using HeuristicLab.Optimization; using HeuristicLab.Parameters; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Problems.NK { [Item("NKMoveEvaluator", "A base class for operators which evaluate moves on the NK Lanscape.")] [StorableClass] public abstract class NKMoveEvaluator : SingleSuccessorOperator, INKMoveEvaluator, IMoveOperator, IBinaryVectorMoveOperator { public ILookupParameter QualityParameter { get { return (ILookupParameter)Parameters["Quality"]; } } public ILookupParameter MoveQualityParameter { get { return (ILookupParameter)Parameters["MoveQuality"]; } } public ILookupParameter BinaryVectorParameter { get { return (ILookupParameter)Parameters["BinaryVector"]; } } public LookupParameter GeneInteractionsParameter { get { return (LookupParameter)Parameters["GeneInteractions"]; } } public LookupParameter InteractionSeedParameter { get { return (LookupParameter)Parameters["InteractionSeed"]; } } public LookupParameter WeightsParameter { get { return (LookupParameter)Parameters["Weights"]; } } [StorableConstructor] protected NKMoveEvaluator(bool deserializing) : base(deserializing) { } protected NKMoveEvaluator(NKMoveEvaluator original, Cloner cloner) : base(original, cloner) { } protected NKMoveEvaluator() : base() { Parameters.Add(new LookupParameter("Quality", "The quality of a OneMax solution.")); Parameters.Add(new LookupParameter("MoveQuality", "The evaluated quality of a move on a OneMax solution.")); Parameters.Add(new LookupParameter("BinaryVector", "The solution as BinaryVector.")); Parameters.Add(new LookupParameter("GeneInteractions", "Matrix indicating gene interactions.")); Parameters.Add(new LookupParameter("InteractionSeed", "Seed used for randomly generting gene interactions.")); Parameters.Add(new LookupParameter("Weights", "The weights for the component functions. If shorter, will be repeated.")); } } }