Changeset 15771 for branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator
- Timestamp:
- 02/13/18 16:56:35 (7 years ago)
- Location:
- branches/2895_PushGP_GenealogyAnalysis
- Files:
-
- 1 added
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator/IPlushCreator.cs
r15334 r15771 1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.SolutionCreator { 2 using HeuristicLab.Core; 3 using HeuristicLab.Data; 4 using HeuristicLab.Optimization; 5 using HeuristicLab.Problems.ProgramSynthesis.Base.Erc; 6 using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration; 7 using HeuristicLab.Problems.ProgramSynthesis.Push.Encoding; 1 using HeuristicLab.Core; 2 using HeuristicLab.Data; 3 using HeuristicLab.Optimization; 8 4 5 namespace HeuristicLab.Problems.ProgramSynthesis { 9 6 public interface IPlushCreator : ISolutionCreator, IPlushOperator { 10 7 IValueLookupParameter<IntValue> MinLengthParameter { get; } -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator/PlushCreator.cs
r15334 r15771 1 1 using System; 2 using HeuristicLab.Common; 3 using HeuristicLab.Core; 4 using HeuristicLab.Data; 5 using HeuristicLab.Operators; 6 using HeuristicLab.Optimization; 7 using HeuristicLab.Parameters; 8 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 2 9 3 namespace HeuristicLab.Problems.ProgramSynthesis.Push.SolutionCreator { 4 using HeuristicLab.Common; 5 using HeuristicLab.Core; 6 using HeuristicLab.Data; 7 using HeuristicLab.Operators; 8 using HeuristicLab.Optimization; 9 using HeuristicLab.Parameters; 10 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 11 using HeuristicLab.Problems.ProgramSynthesis.Base.Erc; 12 using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration; 13 using HeuristicLab.Problems.ProgramSynthesis.Push.Encoding; 14 using HeuristicLab.Problems.ProgramSynthesis.Push.Extensions; 15 using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator; 16 10 namespace HeuristicLab.Problems.ProgramSynthesis { 17 11 [Item("PlushCreator", "An operator which creates a new random plush vector with each element uniformly distributed")] 18 12 [StorableClass] … … 36 30 public PlushCreator(PlushCreator origin, Cloner cloner) : base(origin, cloner) { } 37 31 38 public override bool CanChangeName 39 { 32 public override bool CanChangeName { 40 33 get { return false; } 41 34 } 42 public ILookupParameter<IRandom> RandomParameter 43 { 35 public ILookupParameter<IRandom> RandomParameter { 44 36 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 45 37 } 46 public ILookupParameter<PlushVector> PlushVectorParameter 47 { 38 public ILookupParameter<PlushVector> PlushVectorParameter { 48 39 get { return (ILookupParameter<PlushVector>)Parameters["PlushVector"]; } 49 40 } 50 public IValueLookupParameter<IntValue> MinLengthParameter 51 { 41 public IValueLookupParameter<IntValue> MinLengthParameter { 52 42 get { return (IValueLookupParameter<IntValue>)Parameters["MinLength"]; } 53 43 } 54 public IValueLookupParameter<IntValue> MaxLengthParameter 55 { 44 public IValueLookupParameter<IntValue> MaxLengthParameter { 56 45 get { return (IValueLookupParameter<IntValue>)Parameters["MaxLength"]; } 57 46 } 58 public IValueLookupParameter<IReadOnlyExpressionsConfiguration> InstructionsParameter 59 { 47 public IValueLookupParameter<IReadOnlyExpressionsConfiguration> InstructionsParameter { 60 48 get { return (IValueLookupParameter<IReadOnlyExpressionsConfiguration>)Parameters["Instructions"]; } 61 49 } 62 public IValueLookupParameter<IReadOnlyErcOptions> ErcOptionsParameter 63 { 50 public IValueLookupParameter<IReadOnlyErcOptions> ErcOptionsParameter { 64 51 get { return (IValueLookupParameter<IReadOnlyErcOptions>)Parameters["ErcOptions"]; } 65 52 } 66 public IValueLookupParameter<PercentValue> InInstructionProbabilityParameter 67 { 53 public IValueLookupParameter<PercentValue> InInstructionProbabilityParameter { 68 54 get { return (IValueLookupParameter<PercentValue>)Parameters["InInstructionProbability"]; } 69 55 } 70 public IValueLookupParameter<IntValue> MaxCloseParameter 71 { 56 public IValueLookupParameter<IntValue> MaxCloseParameter { 72 57 get { return (IValueLookupParameter<IntValue>)Parameters["MaxClose"]; } 73 58 } 74 public IValueLookupParameter<DoubleValue> CloseBiasLevelParameter 75 { 59 public IValueLookupParameter<DoubleValue> CloseBiasLevelParameter { 76 60 get { return (IValueLookupParameter<DoubleValue>)Parameters["CloseBiasLevel"]; } 77 61 } -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator/PushSolutionCreator.cs
r15289 r15771 1 namespace HeuristicLab.Problems.ProgramSynthesis.Push.SolutionCreator { 1 using HeuristicLab.Common; 2 using HeuristicLab.Core; 3 using HeuristicLab.Data; 4 using HeuristicLab.Encodings.IntegerVectorEncoding; 5 using HeuristicLab.Parameters; 6 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 2 7 3 using HeuristicLab.Common; 4 using HeuristicLab.Core; 5 using HeuristicLab.Data; 6 using HeuristicLab.Encodings.IntegerVectorEncoding; 7 using HeuristicLab.Parameters; 8 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 9 using HeuristicLab.Problems.ProgramSynthesis.Base.Erc; 10 using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration; 11 8 namespace HeuristicLab.Problems.ProgramSynthesis { 12 9 /// <summary> 13 10 /// Generates a new random integer vector with each element uniformly distributed in a specified range. … … 45 42 46 43 47 public IValueParameter<ErcOptions> ErcOptionsParameter 48 { 44 public IValueParameter<ErcOptions> ErcOptionsParameter { 49 45 get { return (IValueParameter<ErcOptions>)Parameters[ERC_OPTIONS_PARAMETER_NAME]; } 50 46 } 51 47 52 public ErcOptions ErcOptions 53 { 48 public ErcOptions ErcOptions { 54 49 get { return ErcOptionsParameter.Value; } 55 set 56 { 50 set { 57 51 ErcOptionsParameter.Value = value; 58 52 } 59 53 } 60 54 61 public IValueParameter<IntValue> MinLengthParameter 62 { 55 public IValueParameter<IntValue> MinLengthParameter { 63 56 get { return (IValueParameter<IntValue>)Parameters[MIN_LENGTH_PARAMETER_NAME]; } 64 57 } 65 58 66 public int MinLength 67 { 59 public int MinLength { 68 60 get { return MinLengthParameter.Value.Value; } 69 61 set { MinLengthParameter.Value.Value = value; } 70 62 } 71 63 72 public IValueLookupParameter<IReadOnlyExpressionsConfiguration> InstructionsParameter 73 { 64 public IValueLookupParameter<IReadOnlyExpressionsConfiguration> InstructionsParameter { 74 65 get { return (IValueLookupParameter<IReadOnlyExpressionsConfiguration>)Parameters["Instructions"]; } 75 66 } … … 86 77 //} 87 78 88 public IValueParameter<PercentValue> InInstructionProbabilityParameter 89 { 79 public IValueParameter<PercentValue> InInstructionProbabilityParameter { 90 80 get { return (IValueParameter<PercentValue>)Parameters[IN_INSTRUCTION_PROBABILITY]; } 91 81 } 92 82 93 public double InInstructionProbability 94 { 83 public double InInstructionProbability { 95 84 get { return InInstructionProbabilityParameter.Value.Value; } 96 85 set { InInstructionProbabilityParameter.Value.Value = value; } -
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator/PushSolutionEncoding.cs
r15273 r15771 1 namespace HeuristicLab.Problems.ProgramSynthesis .Push.SolutionCreator{1 namespace HeuristicLab.Problems.ProgramSynthesis { 2 2 public class PushSolutionEncoding { 3 3 public const int Noop = -1;
Note: See TracChangeset
for help on using the changeset viewer.