-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
164 lines (120 loc) · 5.99 KB
/
INSTALL
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
************************************************************************
* gpc++ - The Genetic Programming Kernel *
* C++ Class Library *
************************************************************************
The source files
================
Uncompressing the archive file should have created a number of
directories (using "gzip -d <tarfile>.gz ; tar xf <tarfile>" in UNIX,
for instance). Have a look at file FILES for what files should be in
this release.
"src" contains the GP kernel. The "lawn" and "symbreg" directory
contain examples of how to use the kernel. "skeleton" contains the
file "skeleton.cc". This file contains necessary definitions to start
a new problem using the GP kernel.
The "include" directory contains the include files of the kernel, and
the "lib" directory will hold the GP library after compilation.
Technical documentation in postscript format can be found in the "doc"
directory. There is also a short introduction into genetic
programming (by Adam Fraser).
With most genetic programming systems the documentation is the last
thought (apart from John Koza's 'Genetic Programming' book, of course,
which many would consider overkill on a documentation front). Here
then is the compile and go painless method of getting gpc++ up and
evolving something.
Compiling under UNIX
====================
Have a look at the Makefiles, especially Makefile.ini. It contains
some important definitions, for example the name of the C++-Compiler
you want to use, and general compiler and linker flags.
Call "make" in the root GP directory. The main makefile calls make
for each subdirectory, that is first for the basic kernel (directory
src), then for the examples. If any errors occur, modify the
makefiles.
If you receive any error on compilation of the source code check that
the correct directories are being searched for the appropriate
standard header files in the compiler.
"make" can be called with the following arguments:
- clean: Removes the object files as well as the files generated by
the executables, but not the libraries and executables.
- superclean: Same as clean, but also removes all files that can be
regenerated, e.g. Libraries and executables.
- strip: Strips the debug information from the executables
In the root GP directory, the following argument is allowed as well:
- install: Use the program "install" to install the libraries and
include files to the given directory (see the file "Makefile.ini").
Dynamic Libraries
-----------------
If you want to use dynamic libraries, change the file names for the
libraries from .a to .so (in file Makefile.ini). Change the link
command in file src/Makefile so that "ld" will be used instead of
"ar" to create the library.
Installation
------------
The installation commands, when executing "make install", are not
tested. It's easy enough: Just copy the files in the lib and include
directory into /usr/local/bin and /usr/local/include or whatever
directory you prefer.
Examples
--------
Once you compiled the code of the example, an executable named "sym"
in directory symbreg should have been created, as well as "lawn" in
directory lawn and "ant" in directory ant. When executing the
programs, they read configuration files named symbreg.ini, lawn.ini
and ant.ini, respectively, before starting to evolve genetic programs.
For more information on the examples either read the book or the
source code.
The Symbolic Regression Problem tries to evolve a mathematical
function which produces a graph similar (nay identical) to X**4 + X**3
+ X**2 + X described in Koza's book.
The Lawn-mower Problem tries to find a genetic program that mows the
lawn.
The Artificial Ant Problem tries to follow the Santa Fe trail defined
by Koza.
Useless DOS memory allocation
=============================
gpc++ is memory hungry and is designed nowadays for machines which can
access their memory. The DOS operating system is a pain for this and
we did not want to reduce the portability of our code. If you try and
use over 640k of memory (that includes the program and whatever other
garbage you have) the kernel might crash, if you do not set up a new
handler. This is certainly done in all examples. To get over this
you can;
a) Use UNIX (Linux for example).
b) Use Windows (but this is nearly as bad as using DOS).
c) Give up and use small populations.
If you are not keen on any of these options you could buy the Watcom
C/C++ compiler which produces the 32-bit code to counter DOS's
inadequacies. If you have internet access you may wish to look at
djgpp, the DOS port of the GNU compiler. It isn't the most documented
of systems and also doesn't have a nice front end but it does work
which is always nice. Just thought you would like to know.
Thomas Weinbrenner (with parts by Adam Fraser)
LICENCE
=======
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Copyright 1993, 1994 Adam P. Fraser and 1996, 1997 Thomas Weinbrenner
For comments, improvements, additions (or even money) contact:
Thomas Weinbrenner
Grauensteinstr. 26
35789 Laimbach
Germany
E-mail: [email protected]
WWW: http://www.emk.e-technik.th-darmstadt/~thomasw
or
(Address may be out of date)
Adam Fraser, Postgraduate Section, Dept of Elec & Elec Eng,
Maxwell Building, University Of Salford, Salford, M5 4WT, United Kingdom.
E-mail: [email protected]
Tel: (UK) 061 745 5000 x3633
Fax: (UK) 061 745 5999