/
intreg2.pushgp
69 lines (54 loc) · 2.13 KB
/
intreg2.pushgp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 2009-2010 Jon Klein
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# A sample PushGP file for a simple test symbolic regression problem.
# In this demo, the system solves the factorial function using
# integer symbolic regression
#
# Tom Helmuth <thelmuth (at) cs.umass.edu>
# 01/17/2010
#
### Set classes for the Push interpreter and individuals. These
### values can used to implement custom interpreter or individual
### behaviors.
interpreter-class = org.spiderland.Psh.Interpreter
inputpusher-class = org.spiderland.Psh.InputPusher
individual-class = org.spiderland.Psh.PushGPIndividual
### Setup GP parameters
execution-limit = 150
mutation-percent = 30
crossover-percent = 55
simplification-percent = 5
max-generations = 500
tournament-size = 7
trivial-geography-radius= 10
max-points-in-program = 100
mutation-mode = fair
fair-mutation-range = .5
population-size = 1000
max-random-code-size = 40
simplify-flatten-percent= 20
reproduction-simplifications = 25
report-simplifications = 100
final-simplifications = 1000
### The problem class determines how test cases are setup and
### how fitness scores are computed. The IntSymbolicRegression
### class uses a set of int inputs and a single output.
problem-class = org.spiderland.Psh.ProbClass.IntSymbolicRegression
#This test case is for factorial
test-cases = ((1 1) (2 2) (3 6) (4 24) (5 120) (6 720))
target-function-string = y = x!
#Instruction set for factorial
#instruction-set = (registered.integer registered.exec registered.code registered.boolean registered.input input.makeinputs1 )
instruction-set = (registered.integer input.makeinputs1)