// as described in Hasegawa, Genetic Programming - New Approaches and Successful Applications PROBLEM DMAX CODE << >> INIT << >> NONTERMINALS Expr<>. Add3<>. Mul3<>. TERMINALS X1. X2. RULES Expr<> = Mul3<> | Add3<> | X1 SEM << v = 0.95; >> | X2 SEM << v = -1; >> . Mul3<> = LOCAL << double v1, v2, v3; >> Expr<> Expr<> Expr<> SEM << v = v1 * v2 * v3; >> . Add3<> = LOCAL << double v1, v2, v3; >> Expr<> Expr<> Expr<> SEM << v = v1 + v2 + v3; >> . MAXIMIZE << double v; Expr(out v); return v; >> END SymbRegKoza.