artificial life
Chapter 7: The Genetic Images Application
7.2 Application Design
The Genetic Images Application is written for operating systems using the Win32 system architecture. This includes Windows 95/98/ME and Windows NT/2000. Since the program uses a Graphical User Interface in C++ it is required that at least the GUI portion of the code is platform specific. An effort is made to create the application using a core of components whose code is platform independent and adding platform dependencies only at the highest levels. In this way it should be possible to port the application to another operating system without having to rewrite the Genetic Programming engine or the Genetic Images control components. Figure 7.1 is a high level flow diagram of how the different components of the application interact.

Figure 7.1 : Flow between components of the Genetic Images Application
The top level of the diagram, the Win32 GUI, contains the operating system specific code. This level contains components such as window definitions, retrieving input from the user and displaying the results. The components below this level are nearly entirely system independent. The exception is in the Genetic Images Containers & Controller level. The Containers use a platform specific BITMAP structure to store the Genetic Images. This is done because storing the images at this level rather than recalculating them every time the GUI requests them increases the system’s performance significantly. Since the BITMAP is generally similar from platform to platform it is hoped that this is not a significant hindrance to portability.
In the same spirit the actual Genetic Programming System is implemented independent of the Genetic Images Containers & Controller and Genetic Images Value and Operator Definitions. This is done so that this component can also be reused in other Genetic Programming problems without having to write a new Genetic Programming engine.
Genetic Images Win32 Executable:
Genetic Images Appication Source Code
The first level, Genetic Images Value and Operator Definition, consists of two files:
The second level, the Genetic Programming System, consists of three files
The third level, Genetic Images Container & Controller, consists of six files:
The final level, Win32 Graphical User Interface, consists of three files: