Changeset 9834
- Timestamp:
- 08/01/13 11:16:16 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs
r9456 r9834 31 31 /// </summary> 32 32 [StorableClass] 33 public abstract class SymbolicExpressionTreeArchitectureManipulator : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureManipulator {33 public abstract class SymbolicExpressionTreeArchitectureManipulator : TracingSymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureManipulator { 34 34 private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments"; 35 35 private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions"; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
r9456 r9834 38 38 [Item("SubtreeSwappingCrossover", "An operator which performs subtree swapping crossover.")] 39 39 [StorableClass] 40 public class SubtreeCrossover : SymbolicExpressionTreeCrossover, ISymbolicExpressionTreeSizeConstraintOperator {40 public class SubtreeCrossover : TracingSymbolicExpressionTreeCrossover, ISymbolicExpressionTreeSizeConstraintOperator { 41 41 private const string InternalCrossoverPointProbabilityParameterName = "InternalCrossoverPointProbability"; 42 42 private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength"; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
r9828 r9834 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 59 59 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 60 60 <DebugSymbols>true</DebugSymbols> 61 <OutputPath> $(SolutionDir)\bin\</OutputPath>61 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 62 62 <DefineConstants>DEBUG;TRACE</DefineConstants> 63 63 <DebugType>full</DebugType> … … 67 67 </PropertyGroup> 68 68 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 69 <OutputPath> $(SolutionDir)\bin\</OutputPath>69 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 70 70 <DefineConstants>TRACE</DefineConstants> 71 71 <Optimize>true</Optimize> … … 77 77 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 78 78 <DebugSymbols>true</DebugSymbols> 79 <OutputPath> $(SolutionDir)\bin\</OutputPath>79 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 80 80 <DefineConstants>DEBUG;TRACE</DefineConstants> 81 81 <DebugType>full</DebugType> … … 85 85 </PropertyGroup> 86 86 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 87 <OutputPath> $(SolutionDir)\bin\</OutputPath>87 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 88 88 <DefineConstants>TRACE</DefineConstants> 89 89 <Optimize>true</Optimize> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs
r9456 r9834 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using System.Collections.Generic;27 27 28 28 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 29 29 [StorableClass] 30 30 [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")] 31 public sealed class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator {31 public sealed class ChangeNodeTypeManipulation : TracingSymbolicExpressionTreeManipulator { 32 32 private const int MAX_TRIES = 100; 33 33 -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs
r9456 r9834 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters;27 27 28 28 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 29 29 [StorableClass] 30 30 [Item("FullTreeShaker", "Manipulates all nodes that have local parameters.")] 31 public sealed class FullTreeShaker : SymbolicExpressionTreeManipulator {31 public sealed class FullTreeShaker : TracingSymbolicExpressionTreeManipulator { 32 32 private const string ShakingFactorParameterName = "ShakingFactor"; 33 33 #region parameter properties -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
r9456 r9834 37 37 [StorableClass] 38 38 public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>, 39 ITracingSymbolicExpressionTreeOperator, 39 40 ISymbolicExpressionTreeManipulator, 40 41 IStochasticOperator, … … 43 44 private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength"; 44 45 private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth"; 46 private const string SymbolicExpressionTreeNodeComparerParameterName = "SymbolicExpressionTreeNodeComparer"; 47 private const string SymbolicExpressionTreeNodeComparerParameterDescription = "The comparison operator used to check if two symbolic expression tree nodes are equal or similar."; 45 48 49 public ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer> SymbolicExpressionTreeNodeComparerParameter { 50 get { return (ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer>)Parameters[SymbolicExpressionTreeNodeComparerParameterName]; } 51 } 46 52 public override bool CanChangeName { 47 53 get { return false; } … … 63 69 #endregion 64 70 71 [StorableHook(HookType.AfterDeserialization)] 72 private void AfterDeserialization() { 73 if (!Parameters.ContainsKey(SymbolicExpressionTreeNodeComparerParameterName)) 74 Parameters.Add(new ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer>(SymbolicExpressionTreeNodeComparerParameterName, SymbolicExpressionTreeNodeComparerParameterDescription)); 75 } 76 77 65 78 [StorableConstructor] 66 79 private MultiSymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { } … … 71 84 Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree.")); 72 85 Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0).")); 86 Parameters.Add(new ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer>(SymbolicExpressionTreeNodeComparerParameterName, SymbolicExpressionTreeNodeComparerParameterDescription)); 73 87 74 88 List<ISymbolicExpressionTreeManipulator> list = new List<ISymbolicExpressionTreeManipulator>(); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
r9456 r9834 20 20 #endregion 21 21 22 using System. Linq;22 using System.Collections.Generic; 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Parameters; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 28 30 29 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 31 30 [StorableClass] 32 31 [Item("OnePointShaker", "Selects a random node with local parameters and manipulates the selected node.")] 33 public sealed class OnePointShaker : SymbolicExpressionTreeManipulator {32 public sealed class OnePointShaker : TracingSymbolicExpressionTreeManipulator { 34 33 private const string ShakingFactorParameterName = "ShakingFactor"; 35 34 #region parameter properties -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs
r9456 r9834 31 31 [StorableClass] 32 32 [Item("RemoveBranchManipulation", "Removes a random sub-tree of the input tree and fixes the tree by generating random subtrees if necessary..")] 33 public sealed class RemoveBranchManipulation : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator {33 public sealed class RemoveBranchManipulation : TracingSymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator { 34 34 private const int MAX_TRIES = 100; 35 35 private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength"; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs
r9456 r9834 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Linq; 23 24 using HeuristicLab.Common; … … 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System.Collections.Generic;29 29 30 30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 31 31 [StorableClass] 32 32 [Item("ReplaceBranchManipulation", "Selects a branch of the tree randomly and replaces it with a newly initialized branch (using PTC2).")] 33 public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator {33 public sealed class ReplaceBranchManipulation : TracingSymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator { 34 34 private const int MAX_TRIES = 100; 35 35 private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength"; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs
r9456 r9834 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data;25 24 using HeuristicLab.Parameters; 26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Note: See TracChangeset
for help on using the changeset viewer.