Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9834 for branches


Ignore:
Timestamp:
08/01/13 11:16:16 (11 years ago)
Author:
bburlacu
Message:

#1772: Manually merged HeuristicLab.Encodings.SymbolicExpressionTreeEncoding project from the trunk to the branch.

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  
    3131  /// </summary>
    3232  [StorableClass]
    33   public abstract class SymbolicExpressionTreeArchitectureManipulator : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureManipulator {
     33  public abstract class SymbolicExpressionTreeArchitectureManipulator : TracingSymbolicExpressionTreeManipulator, ISymbolicExpressionTreeArchitectureManipulator {
    3434    private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
    3535    private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs

    r9456 r9834  
    3838  [Item("SubtreeSwappingCrossover", "An operator which performs subtree swapping crossover.")]
    3939  [StorableClass]
    40   public class SubtreeCrossover : SymbolicExpressionTreeCrossover, ISymbolicExpressionTreeSizeConstraintOperator {
     40  public class SubtreeCrossover : TracingSymbolicExpressionTreeCrossover, ISymbolicExpressionTreeSizeConstraintOperator {
    4141    private const string InternalCrossoverPointProbabilityParameterName = "InternalCrossoverPointProbability";
    4242    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj

    r9828 r9834  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    5959  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6060    <DebugSymbols>true</DebugSymbols>
    61     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     61    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    6262    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6363    <DebugType>full</DebugType>
     
    6767  </PropertyGroup>
    6868  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    69     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     69    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    7070    <DefineConstants>TRACE</DefineConstants>
    7171    <Optimize>true</Optimize>
     
    7777  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    7878    <DebugSymbols>true</DebugSymbols>
    79     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     79    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    8080    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8181    <DebugType>full</DebugType>
     
    8585  </PropertyGroup>
    8686  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    87     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     87    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    8888    <DefineConstants>TRACE</DefineConstants>
    8989    <Optimize>true</Optimize>
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs

    r9456 r9834  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Linq;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using System.Collections.Generic;
    2727
    2828namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    2929  [StorableClass]
    3030  [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")]
    31   public sealed class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator {
     31  public sealed class ChangeNodeTypeManipulation : TracingSymbolicExpressionTreeManipulator {
    3232    private const int MAX_TRIES = 100;
    3333
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs

    r9456 r9834  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     25using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Parameters;
    2727
    2828namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    2929  [StorableClass]
    3030  [Item("FullTreeShaker", "Manipulates all nodes that have local parameters.")]
    31   public sealed class FullTreeShaker : SymbolicExpressionTreeManipulator {
     31  public sealed class FullTreeShaker : TracingSymbolicExpressionTreeManipulator {
    3232    private const string ShakingFactorParameterName = "ShakingFactor";
    3333    #region parameter properties
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs

    r9456 r9834  
    3737  [StorableClass]
    3838  public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>,
     39    ITracingSymbolicExpressionTreeOperator,
    3940    ISymbolicExpressionTreeManipulator,
    4041    IStochasticOperator,
     
    4344    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
    4445    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.";
    4548
     49    public ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer> SymbolicExpressionTreeNodeComparerParameter {
     50      get { return (ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer>)Parameters[SymbolicExpressionTreeNodeComparerParameterName]; }
     51    }
    4652    public override bool CanChangeName {
    4753      get { return false; }
     
    6369    #endregion
    6470
     71    [StorableHook(HookType.AfterDeserialization)]
     72    private void AfterDeserialization() {
     73      if (!Parameters.ContainsKey(SymbolicExpressionTreeNodeComparerParameterName))
     74        Parameters.Add(new ValueParameter<ISymbolicExpressionTreeNodeSimilarityComparer>(SymbolicExpressionTreeNodeComparerParameterName, SymbolicExpressionTreeNodeComparerParameterDescription));
     75    }
     76
     77
    6578    [StorableConstructor]
    6679    private MultiSymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { }
     
    7184      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
    7285      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));
    7387
    7488      List<ISymbolicExpressionTreeManipulator> list = new List<ISymbolicExpressionTreeManipulator>();
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs

    r9456 r9834  
    2020#endregion
    2121
    22 using System.Linq;
     22using System.Collections.Generic;
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    2928
    3029namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    3130  [StorableClass]
    3231  [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 {
    3433    private const string ShakingFactorParameterName = "ShakingFactor";
    3534    #region parameter properties
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs

    r9456 r9834  
    3131  [StorableClass]
    3232  [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 {
    3434    private const int MAX_TRIES = 100;
    3535    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs

    r9456 r9834  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Linq;
    2324using HeuristicLab.Common;
     
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
    2929
    3030namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    3131  [StorableClass]
    3232  [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 {
    3434    private const int MAX_TRIES = 100;
    3535    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs

    r9456 r9834  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2524using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Note: See TracChangeset for help on using the changeset viewer.