Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Creator/PointsBasedPushProgramCreator.cs @ 14727

Last change on this file since 14727 was 14727, checked in by pkimmesw, 7 years ago

#2665 PushGP HL Integration, Views, Parameters

File size: 1.2 KB
Line 
1namespace HeuristicLab.Problems.ProgramSynthesis.Push.Creator {
2
3  using HeuristicLab.Common;
4  using HeuristicLab.Core;
5  using HeuristicLab.Operators;
6  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
8  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
9  using HeuristicLab.Problems.ProgramSynthesis.Push.Generators;
10
11  [Item("PointBasedPushProgramCreator", "Creates a Push program whereby points specify the max size but not the min size of the program.")]
12  [StorableClass]
13  public class PointsBasedPushProgramCreator : InstrumentedOperator, IPushProgramCreator {
14
15    public PointsBasedPushProgramCreator(bool deserializing) : base(deserializing) { }
16
17    public PointsBasedPushProgramCreator(PointsBasedPushProgramCreator origin, Cloner cloner) : base(origin, cloner) {
18
19    }
20
21    public override IDeepCloneable Clone(Cloner cloner) {
22      return new PointsBasedPushProgramCreator(this, cloner);
23    }
24
25    public PushProgram CreateProgram(IRandom random, IReadonlyPushGpConfiguration config) {
26      return CodeGenerator.RandomProgram(10, random, config);
27    }
28  }
29}
Note: See TracBrowser for help on using the repository browser.