Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9844 for branches


Ignore:
Timestamp:
08/03/13 23:10:19 (11 years ago)
Author:
gkronber
Message:

#2026 added two GP benchmark problems even-parity and multiplexer.

Location:
branches/HeuristicLab.Problems.GPDL
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlExampleProvider.cs

    r9842 r9844  
    3434          new GpdlExampleDataDescriptor("Fibonacci", "Evolve a problem to calculate the fibonacci function.", Resources.Fib),
    3535          new GpdlExampleDataDescriptor("Multi-output multiplier", "Evolve a multi-output multiplier.", Resources.multi_output_multiplier),
     36          new GpdlExampleDataDescriptor("Even parity", "The even parity (4) benchmark problem.", Resources.EvenParity),
     37          new GpdlExampleDataDescriptor("Multiplexer (11)", "The Mux-11 multiplexer benchmark problem.", Resources.Multiplexer),
    3638          new GpdlExampleDataDescriptor("Symbolic Regression (HEAL-style)", "A symbolic regression problem for genetic programming, using weights for variables.", Resources.symbreg_HEAL),
    3739          new GpdlExampleDataDescriptor("Symbolic Regression (Koza-style)", "Koza-style symbolic regression problem for genetic programming.", Resources.symbreg_Koza),
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/HeuristicLab.Problems.GPDL.Views-3.4.csproj

    r9674 r9844  
    263263      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    264264    </Content>
     265    <None Include="Resources\Multiplexer.txt" />
     266    <None Include="Resources\EvenParity.txt" />
    265267  </ItemGroup>
    266268  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/Properties/Resources.Designer.cs

    r9674 r9844  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:4.0.30319.18047
     4//     Runtime Version:4.0.30319.18052
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    9090       
    9191        /// <summary>
     92        ///   Looks up a localized string similar to PROBLEM EvenParity
     93        ///CODE &lt;&lt;
     94        ///  const int N = 5;
     95        ///&gt;&gt;
     96        ///
     97        ///NONTERMINALS
     98        ///  Expr&lt;&lt;bool[] d, out bool p&gt;&gt;.
     99        ///  AND&lt;&lt;bool[] d, out bool p&gt;&gt;.
     100        ///  OR&lt;&lt;bool[] d, out bool p&gt;&gt;.
     101        ///  NAND&lt;&lt;bool[] d, out bool p&gt;&gt;.
     102        ///  NOR&lt;&lt;bool[] d, out bool p&gt;&gt;.
     103        ///
     104        ///TERMINALS
     105        ///  D&lt;&lt;out int val&gt;&gt;
     106        ///    CONSTRAINTS
     107        ///      val IN SET &lt;&lt;Enumerable.Range(0, N);&gt;&gt;
     108        ///  .
     109        ///
     110        ///RULES
     111        ///  Expr&lt;&lt;bool[] d, out bool p&gt;&gt; =                           LOCAL&lt;&lt; int val = 0; &gt;&gt;
     112        ///    AND&lt;&lt;d, out p&gt;&gt;
     113        ///    | OR&lt;&lt;d, out p&gt;&gt;
     114        ///    | NAND&lt;&lt;d, out p&gt;&gt;
     115        ///    | NOR&lt;&lt;d, out p [rest of string was truncated]&quot;;.
     116        /// </summary>
     117        internal static string EvenParity {
     118            get {
     119                return ResourceManager.GetString("EvenParity", resourceCulture);
     120            }
     121        }
     122       
     123        /// <summary>
    92124        ///   Looks up a localized string similar to PROBLEM Factorial
    93125        ///CODE&lt;&lt;
     
    146178       
    147179        /// <summary>
    148         ///   Looks up a localized string similar to &lt;!-- Syntax definition of GPDL for Avalonedit syntax highlighting --&gt;
     180        ///   Looks up a localized string similar to &lt;!-- Syntax definition of GPDL for AvalonEdit syntax highlighting --&gt;
    149181        ///&lt;SyntaxDefinition name=&quot;GPDL&quot;
    150182        ///        xmlns=&quot;http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008&quot;&gt;
    151183        ///  &lt;Color name=&quot;Comment&quot; foreground=&quot;Green&quot; /&gt;
    152         ///  &lt;Color name=&quot;String&quot; foreground=&quot;Blue&quot; /&gt;
     184        ///  &lt;Color name=&quot;SourceCode&quot; foreground=&quot;SlateGray&quot; /&gt;
    153185        ///
    154186        ///  &lt;!-- This is the main ruleset. --&gt;
    155         ///  &lt;RuleSet&gt;
    156         ///    &lt;Span color=&quot;Comment&quot; multiline=&quot;true&quot; nested=&quot;true&quot;
    157         ///       begin=&quot;/\*&quot; end=&quot;\*/&quot; /&gt;
    158         ///
    159         ///    &lt;Span color=&quot;SourceCode&quot; multiline=&quot;true&quot;
    160         ///       begin=&quot;&amp;lt;&amp;lt;&quot; end=&quot;&amp;gt;&amp;gt;&quot; /&gt;
    161         ///    &lt;K [rest of string was truncated]&quot;;.
     187        ///  &lt;RuleSet ignoreCase=&quot;true&quot;&gt;
     188        ///    &lt;Span color=&quot;Comment&quot; multiline=&quot;true&quot; begin=&quot;/\*&quot; end=&quot;\*/&quot; /&gt;
     189        ///    &lt;Span color=&quot;SourceCode&quot; multiline=&quot;true&quot; begin=&quot;&amp;lt;&amp;lt;&quot; end=&quot;&amp;gt;&amp;gt;&quot;&gt;
     190        ///      &lt;RuleSe [rest of string was truncated]&quot;;.
    162191        /// </summary>
    163192        internal static string GPDL {
     
    188217       
    189218        /// <summary>
     219        ///   Looks up a localized string similar to PROBLEM Multiplexer
     220        ///
     221        ///NONTERMINALS
     222        ///  Expr&lt;&lt;bool[] d, out bool p&gt;&gt;.
     223        ///  AND&lt;&lt;bool[] d, out bool p&gt;&gt;.
     224        ///  OR&lt;&lt;bool[] d, out bool p&gt;&gt;.
     225        ///  NOT&lt;&lt;bool[] d, out bool p&gt;&gt;.
     226        ///  IF&lt;&lt;bool[] d, out bool p&gt;&gt;.
     227        ///
     228        ///TERMINALS
     229        ///  A0. A1. A2. A2. D0. D1. D2. D3. D4. D5. D6. D7.
     230        ///
     231        ///RULES
     232        ///  Expr&lt;&lt;bool[] d, out bool o&gt;&gt; =
     233        ///    AND&lt;&lt;d, out p&gt;&gt;
     234        ///    | OR&lt;&lt;d, out p&gt;&gt;
     235        ///    | NOT&lt;&lt;d, out p&gt;&gt;
     236        ///    | IF&lt;&lt;d, out p&gt;&gt;
     237        ///    | A0                                                   SEM&lt;&lt; p = d[0]; &gt;&gt;
     238        ///    | A1                                   [rest of string was truncated]&quot;;.
     239        /// </summary>
     240        internal static string Multiplexer {
     241            get {
     242                return ResourceManager.GetString("Multiplexer", resourceCulture);
     243            }
     244        }
     245       
     246        /// <summary>
    190247        ///   Looks up a localized string similar to PROBLEM SymbReg
    191248        ///
    192249        ///CODE &lt;&lt;
    193         ///  double[,] inputValues;
    194         ///  double[] targetValues;
     250        ///  double[,] x;
     251        ///  double[] y;
    195252        ///  string[] variableNames;
    196253        ///  Dictionary&lt;string,int&gt; nameToCol;
     
    204261        ///      }
    205262        ///    }
    206         ///    return data[row, nameToCol[varName]];
    207         ///  }
    208         ///
    209         ///  double RSquared(IEnumerable&lt;double&gt; [rest of string was truncated]&quot;;.
     263        ///    return x[row, nameToCol[varName]];
     264        ///  }
     265        ///
     266        ///  double RSquared(IEnumerable&lt;double&gt; xs, IEnumerable&lt;double&gt; [rest of string was truncated]&quot;;.
    210267        /// </summary>
    211268        internal static string symbreg_HEAL {
     
    218275        ///   Looks up a localized string similar to PROBLEM SymbRegKoza
    219276        ///CODE &lt;&lt;
    220         ///  double[,] inputValues;
    221         ///  double[] targetValues;
     277        ///  double[,] x;
     278        ///  double[] y;
    222279        ///  string[] variableNames;
    223280        ///  Dictionary&lt;string,int&gt; nameToCol;
     
    231288        ///      }
    232289        ///    }
    233         ///    return data[row, nameToCol[varName]];
    234         ///  }
    235         ///
    236         ///  double RSquared(IEnumerable&lt;double [rest of string was truncated]&quot;;.
     290        ///    return x[row, nameToCol[varName]];
     291        ///  }
     292        ///
     293        ///  double RSquared(IEnumerable&lt;double&gt; xs, IEnumerable&lt;double [rest of string was truncated]&quot;;.
    237294        /// </summary>
    238295        internal static string symbreg_Koza {
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/Properties/Resources.resx

    r9674 r9844  
    122122    <value>..\Resources\Artificial Ant.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
    123123  </data>
     124  <data name="EvenParity" type="System.Resources.ResXFileRef, System.Windows.Forms">
     125    <value>..\resources\evenparity.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
     126  </data>
    124127  <data name="Factorial" type="System.Resources.ResXFileRef, System.Windows.Forms">
    125128    <value>..\Resources\Factorial.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
     
    130133  <data name="GPDL" type="System.Resources.ResXFileRef, System.Windows.Forms">
    131134    <value>..\Resources\GPDL.xshd;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
     135  </data>
     136  <data name="Multiplexer" type="System.Resources.ResXFileRef, System.Windows.Forms">
     137    <value>..\resources\multiplexer.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
    132138  </data>
    133139  <data name="multi_output_multiplier" type="System.Resources.ResXFileRef, System.Windows.Forms">
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg

    r9843 r9844  
    141141                                                                                    tNode = null;
    142142                                                                                    TerminalNode myTNode = null;
    143                                                                                     IEnumerableConstraintNode constraints = null;
     143                                                                                    IEnumerableConstraintNode constraints = new List<ConstraintNode>();
    144144                                                                                    string src = "";
    145145                                                                                  .)
     
    152152                                                                                         myTNode.FieldDefinitions = SourceReader.ExtractFormalParameters(src);
    153153                                                                                  .)
    154   [ "CONSTRAINTS" ConstraintDef<out constraints>                                  (. myTNode.Constraints = constraints; .)
    155   ]
     154  [ "CONSTRAINTS" ConstraintDef<out constraints>
     155  ]                                                                               (. myTNode.Constraints = constraints; .)
    156156  '.'
    157157  .
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Parser.cs

    r9843 r9844  
    206206    tNode = null;
    207207    TerminalNode myTNode = null;
    208     IEnumerableConstraintNode constraints = null;
     208    IEnumerableConstraintNode constraints = new List<ConstraintNode>();
    209209    string src = "";
    210210   
     
    223223      Get();
    224224      ConstraintDef(out constraints);
    225       myTNode.Constraints = constraints;
    226     }
     225    }
     226    myTNode.Constraints = constraints;
    227227    Expect(13);
    228228  }
  • branches/HeuristicLab.Problems.GPDL/Test/Test.csproj

    r9843 r9844  
    2222    <DebugType>full</DebugType>
    2323    <Optimize>false</Optimize>
    24     <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     24    <OutputPath>..\trunk\sources\bin\</OutputPath>
    2525    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2626    <ErrorReport>prompt</ErrorReport>
     
    3030    <DebugType>pdbonly</DebugType>
    3131    <Optimize>true</Optimize>
    32     <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     32    <OutputPath>..\..\..\trunk\sources\bin\</OutputPath>
    3333    <DefineConstants>TRACE</DefineConstants>
    3434    <ErrorReport>prompt</ErrorReport>
     
    3838    <Reference Include="ALGLIB-3.7.0">
    3939      <HintPath>..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
     40      <Private>True</Private>
    4041    </Reference>
    4142    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
    4243      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
     44      <Private>True</Private>
    4345    </Reference>
    4446    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
    4547      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
     48      <Private>True</Private>
    4649    </Reference>
    4750    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    4851      <SpecificVersion>False</SpecificVersion>
    4952      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     53      <Private>True</Private>
    5054    </Reference>
    5155    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    5256      <SpecificVersion>False</SpecificVersion>
    5357      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     58      <Private>True</Private>
    5459    </Reference>
    5560    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4">
    5661      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
     62      <Private>True</Private>
    5763    </Reference>
    5864    <Reference Include="HeuristicLab.Operators-3.3">
    5965      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     66      <Private>True</Private>
    6067    </Reference>
    6168    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    6269      <SpecificVersion>False</SpecificVersion>
    6370      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     71      <Private>True</Private>
    6472    </Reference>
    6573    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
    6674      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
     75      <Private>True</Private>
    6776    </Reference>
    6877    <Reference Include="HeuristicLab.ParallelEngine-3.3">
    6978      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.ParallelEngine-3.3.dll</HintPath>
     79      <Private>True</Private>
    7080    </Reference>
    7181    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
    7282      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
     83      <Private>True</Private>
    7384    </Reference>
    7485    <Reference Include="HeuristicLab.Problems.Instances-3.3">
    7586      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     87      <Private>True</Private>
    7688    </Reference>
    7789    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3">
    7890      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
     91      <Private>True</Private>
    7992    </Reference>
    8093    <Reference Include="HeuristicLab.Random-3.3">
    8194      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     95      <Private>True</Private>
    8296    </Reference>
    8397    <Reference Include="HeuristicLab.SequentialEngine-3.3">
    8498      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
     99      <Private>True</Private>
    85100    </Reference>
    86101    <Reference Include="System" />
     
    107122      <Project>{3f9e665a-3dcb-49c3-8806-0e47fc48ea52}</Project>
    108123      <Name>HeuristicLab.Problems.GPDL.Views-3.4</Name>
     124      <Private>True</Private>
    109125    </ProjectReference>
    110126    <ProjectReference Include="..\HeuristicLab.Problems.GPDL\3.4\HeuristicLab.Problems.GPDL-3.4.csproj">
    111127      <Project>{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}</Project>
    112128      <Name>HeuristicLab.Problems.GPDL-3.4</Name>
     129      <Private>True</Private>
    113130    </ProjectReference>
    114131  </ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.