Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/13/18 16:56:35 (6 years ago)
Author:
bburlacu
Message:

#2895: Add solution skeleton for PushGP with genealogy analysis.

Location:
branches/2895_PushGP_GenealogyAnalysis
Files:
1 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IEnabledExpressionsConfiguration.cs

    r15289 r15771  
    22using System.Collections.Generic;
    33
    4 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
     4namespace HeuristicLab.Problems.ProgramSynthesis {
    55  using HeuristicLab.Core;
    6   using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    7   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
    86
    97  public class EnabledExpressionsChangedEventArgs : EventArgs {
  • branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IReadonlyPushConfiguration.cs

    r15341 r15771  
    1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
    2 
    3   using Base.Erc;
    4 
    5   using Stack;
    6 
     1namespace HeuristicLab.Problems.ProgramSynthesis {
    72  public interface IReadOnlyPushConfiguration : IReadOnlyExpressionsConfiguration {
    83    int EvalPushLimit { get; }
  • branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfiguration.cs

    r15344 r15771  
    1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
     1namespace HeuristicLab.Problems.ProgramSynthesis {
    22  using System.Collections.Generic;
    33
     
    77  using HeuristicLab.Parameters;
    88  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9   using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;
    109
    1110  [StorableClass]
     
    145144    }
    146145
    147     public IValueParameter<IExpressionsConfiguration> InstructionsParameter
    148     {
     146    public IValueParameter<IExpressionsConfiguration> InstructionsParameter {
    149147      get { return (IValueParameter<IExpressionsConfiguration>)Parameters[INSTRUCTIONS_PARAMETER_NAME]; }
    150148    }
    151149
    152     public IExpressionsConfiguration Instructions
    153     {
     150    public IExpressionsConfiguration Instructions {
    154151      get { return InstructionsParameter.Value; }
    155152      set { InstructionsParameter.Value = value; }
    156153    }
    157154
    158     public IValueParameter<ErcOptions> ErcOptionsParameter
    159     {
     155    public IValueParameter<ErcOptions> ErcOptionsParameter {
    160156      get { return (IValueParameter<ErcOptions>)Parameters[ERC_OPTIONS_PARAMETER_NAME]; }
    161157    }
    162158
    163     public ErcOptions ErcOptions
    164     {
     159    public ErcOptions ErcOptions {
    165160      get { return ErcOptionsParameter.Value; }
    166       set
    167       {
     161      set {
    168162        ErcOptionsParameter.Value = value;
    169163      }
    170164    }
    171165
    172     IReadOnlyList<string> IReadOnlyExpressionsConfiguration.EnabledExpressions
    173     {
    174       get
    175       {
     166    IReadOnlyList<string> IReadOnlyExpressionsConfiguration.EnabledExpressions {
     167      get {
    176168        return enabledExpressions;
    177169      }
    178170    }
    179171
    180     IReadOnlyErcOptions IReadOnlyPushConfiguration.ErcOptions
    181     {
    182       get
    183       {
     172    IReadOnlyErcOptions IReadOnlyPushConfiguration.ErcOptions {
     173      get {
    184174        return ErcOptions;
    185175      }
     
    195185    ///     is up to the calling program.
    196186    /// </summary>
    197     public IValueParameter<IntValue> EvalPushLimitParameter
    198     {
     187    public IValueParameter<IntValue> EvalPushLimitParameter {
    199188      get { return (IValueParameter<IntValue>)Parameters[EVAL_PUSH_LIMIT_PARAMETER_NAME]; }
    200189    }
    201190
    202     public int EvalPushLimit
    203     {
     191    public int EvalPushLimit {
    204192      get { return EvalPushLimitParameter.Value.Value; }
    205193      set { EvalPushLimitParameter.Value.Value = value; }
     
    212200    /// x smaller than 1 means that result is biased towards max.
    213201    /// </summary>
    214     public IValueParameter<DoubleValue> CloseBiasLevelParameter
    215     {
     202    public IValueParameter<DoubleValue> CloseBiasLevelParameter {
    216203      get { return (IValueParameter<DoubleValue>)Parameters[CLOSE_BIAS_LEVEL_PARAMETER_NAME]; }
    217204    }
    218205
    219     public double CloseBiasLevel
    220     {
     206    public double CloseBiasLevel {
    221207      get { return CloseBiasLevelParameter.Value.Value; }
    222208      set { CloseBiasLevelParameter.Value.Value = value; }
     
    226212    /// Determines the maximum of blocks which will be closed.
    227213    /// </summary>
    228     public IValueParameter<IntValue> MaxCloseParameter
    229     {
     214    public IValueParameter<IntValue> MaxCloseParameter {
    230215      get { return (IValueParameter<IntValue>)Parameters[MAX_CLOSE_PARAMETER_NAME]; }
    231216    }
    232217
    233     public int MaxClose
    234     {
     218    public int MaxClose {
    235219      get { return MaxCloseParameter.Value.Value; }
    236       set
    237       {
     220      set {
    238221        MaxCloseParameter.Value.Value = value;
    239222      }
     
    243226    /// This is the maximum of depth a push program can have. Expressions, which lead to exceed this limit are interpreted as NOOP.
    244227    /// </summary>
    245     public IValueParameter<IntValue> MaxDepthParameter
    246     {
     228    public IValueParameter<IntValue> MaxDepthParameter {
    247229      get { return (IValueParameter<IntValue>)Parameters[MAX_DEPTH_PARAMETER_NAME]; }
    248230    }
    249231
    250     public int MaxDepth
    251     {
     232    public int MaxDepth {
    252233      get { return MaxDepthParameter.Value.Value; }
    253       set
    254       {
     234      set {
    255235        MaxDepthParameter.Value.Value = value;
    256236      }
    257237    }
    258238
    259     public IValueParameter<IntValue> MinProgramLengthParameter
    260     {
     239    public IValueParameter<IntValue> MinProgramLengthParameter {
    261240      get { return (IValueParameter<IntValue>)Parameters[MIN_PROGRAM_LENGTH]; }
    262241    }
    263242
    264     public int MinProgramLength
    265     {
     243    public int MinProgramLength {
    266244      get { return MinProgramLengthParameter.Value.Value; }
    267       set
    268       {
     245      set {
    269246        MinProgramLengthParameter.Value.Value = value;
    270247      }
     
    277254    ///     instruction.
    278255    /// </summary>
    279     public IValueParameter<IntValue> MaxProgramLengthParameter
    280     {
     256    public IValueParameter<IntValue> MaxProgramLengthParameter {
    281257      get { return (IValueParameter<IntValue>)Parameters[MAX_PROGRAM_LENGTH]; }
    282258    }
    283259
    284     public int MaxProgramLength
    285     {
     260    public int MaxProgramLength {
    286261      get { return MaxProgramLengthParameter.Value.Value; }
    287       set
    288       {
     262      set {
    289263        MaxProgramLengthParameter.Value.Value = value;
    290264      }
    291265    }
    292266
    293     public IValueParameter<IntValue> MaxVectorLengthParameter
    294     {
     267    public IValueParameter<IntValue> MaxVectorLengthParameter {
    295268      get { return (IValueParameter<IntValue>)Parameters[MAX_VECTOR_LENGTH_PARAMETER_NAME]; }
    296269    }
    297270
    298     public int MaxVectorLength
    299     {
     271    public int MaxVectorLength {
    300272      get { return MaxVectorLengthParameter.Value.Value; }
    301273      set { MaxVectorLengthParameter.Value.Value = value; }
     
    305277    ///     The maximum number of points in an expression produced by the CODE.RAND instruction.
    306278    /// </summary>
    307     public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter
    308     {
     279    public IValueParameter<IntValue> MaxPointsInRandomExpressionParameter {
    309280      get { return (IValueParameter<IntValue>)Parameters[MAX_POINTS_IN_RANDOM_INSTRUCTION_PARAMETER_NAME]; }
    310281    }
    311282
    312     public int MaxPointsInRandomExpression
    313     {
     283    public int MaxPointsInRandomExpression {
    314284      get { return MaxPointsInRandomExpressionParameter.Value.Value; }
    315       set
    316       {
     285      set {
    317286        MaxPointsInRandomExpressionParameter.Value.Value = value;
    318287      }
     
    323292    ///     will be pushed onto the CODE stack prior to execution.
    324293    /// </summary>
    325     public IValueParameter<BoolValue> TopLevelPushCodeParameter
    326     {
     294    public IValueParameter<BoolValue> TopLevelPushCodeParameter {
    327295      get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_PUSH_CODE_PARAMETER_NAME]; }
    328296    }
    329297
    330     public bool TopLevelPushCode
    331     {
     298    public bool TopLevelPushCode {
    332299      get { return TopLevelPushCodeParameter.Value.Value; }
    333       set
    334       {
     300      set {
    335301        TopLevelPushCodeParameter.Value.Value = value;
    336302      }
     
    340306    ///     When TRUE, the CODE stack will be popped at the end of top level calls to the interpreter. The default is FALSE.
    341307    /// </summary>
    342     public IValueParameter<BoolValue> TopLevelPopCodeParameter
    343     {
     308    public IValueParameter<BoolValue> TopLevelPopCodeParameter {
    344309      get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_POP_CODE_PARAMETER_NAME]; }
    345310    }
    346311
    347     public bool TopLevelPopCode
    348     {
     312    public bool TopLevelPopCode {
    349313      get { return TopLevelPopCodeParameter.Value.Value; }
    350       set
    351       {
     314      set {
    352315        TopLevelPopCodeParameter.Value.Value = value;
    353316      }
    354317    }
    355318
    356     public IValueParameter<IntValue> MaxStringLengthParameter
    357     {
     319    public IValueParameter<IntValue> MaxStringLengthParameter {
    358320      get { return (IValueParameter<IntValue>)Parameters[MAX_STRING_LENGTH_PARAMETER_NAME]; }
    359321    }
    360322
    361     public int MaxStringLength
    362     {
     323    public int MaxStringLength {
    363324      get { return MaxStringLengthParameter.Value.Value; }
    364325      set { MaxStringLengthParameter.Value.Value = value; }
    365326    }
    366327
    367     public IValueParameter<BoolValue> TopLevelPushInputArgumentsParameter
    368     {
     328    public IValueParameter<BoolValue> TopLevelPushInputArgumentsParameter {
    369329      get { return (IValueParameter<BoolValue>)Parameters[TOP_LEVEL_PUSH_INPUT_ARGUMENTS]; }
    370330    }
    371331
    372     public bool TopLevelPushInputArguments
    373     {
     332    public bool TopLevelPushInputArguments {
    374333      get { return TopLevelPushInputArgumentsParameter.Value.Value; }
    375334      set { TopLevelPushInputArgumentsParameter.Value.Value = value; }
  • branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs

    r15273 r15771  
    33using System.Linq;
    44
    5 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Configuration {
     5namespace HeuristicLab.Problems.ProgramSynthesis {
    66  using HeuristicLab.Common;
    77  using HeuristicLab.Core;
    88  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9   using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    10   using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions;
    11   using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
    129
    1310  [StorableClass]
     
    5350    }
    5451
    55     public IReadOnlyList<string> EnabledExpressions
    56     {
     52    public IReadOnlyList<string> EnabledExpressions {
    5753      get { return enabledExpressions; }
    58       set
    59       {
     54      set {
    6055        var removedExpressions = enabledExpressions.ToList();
    6156        enabledExpressions.Clear();
Note: See TracChangeset for help on using the changeset viewer.