Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GPDL/Examples/DeceptiveMax.txt @ 13811

Last change on this file since 13811 was 10431, checked in by gkronber, 11 years ago

Added deceptive max problem.

File size: 955 bytes
Line 
1// as described in Hasegawa, Genetic Programming - New Approaches and Successful Applications
2PROBLEM DMAX
3CODE <<
4>>
5
6INIT <<
7>>
8
9NONTERMINALS
10  Expr<<out double v>>.
11  Add3<<out double v>>.
12  Mul3<<out double v>>.
13
14TERMINALS
15  X1. X2.
16
17RULES
18  Expr<<out double v>> =
19    Mul3<<out v>>
20    | Add3<<out v>>
21    | X1                                                   SEM << v = 0.95; >>
22    | X2                                                   SEM << v = -1; >>
23  .
24
25  Mul3<<out double v>> =                                   LOCAL << double v1, v2, v3; >>
26     Expr<<out v1>> Expr<<out v2>> Expr<<out v3>>          SEM << v = v1 * v2 * v3; >>
27  .
28
29  Add3<<out double v>> =                                   LOCAL << double v1, v2, v3; >>
30     Expr<<out v1>> Expr<<out v2>> Expr<<out v3>>          SEM << v = v1 + v2 + v3; >>
31  .
32 
33MAXIMIZE
34  <<
35    double v;
36    Expr(out v);
37    return v;
38  >>
39END SymbRegKoza.
Note: See TracBrowser for help on using the repository browser.