According to the modular programming concept, all executables are generated by linking together separate specialised modules (object files). A module without object file, thus merely containing definitions is called virtual. The following table lists all modules and shows their hierarchic dependencies. The files problem .c and problem .o refer to the source and object file of the problem definition (e.g. to enc.c and enc.o). For a more detailed description, please refer to the Makefile.
Module | File | Source | Using |
Definitions | defs.o | defs.c defs.h | |
Sequential | seq.o | seq.c seq.h | defs.h |
Parallel | par.o | par.c par.h | defs.h CS-Tools |
Simulation | sim.o | sim.c sim.h | defs.h |
Individual | virtual | ind.h | defs.h |
Standard Net | stdnet.o | stdnet.c stdnet.h | defs.h ind.h |
Problem Def. | problem .o | problem .c | defs.h ind.h stdnet.h |
Genetic Alg. | gen.o | gen.c gen.h | defs.h ind.h gen.h |
Backpropagation | back.o | back.c back.h | defs.h ind.h |
Gen. Backprop. | genback.o | genback.c genback.h | defs.h ind.h back.h |
Main Sequential | mainseq.o | mainseq.c | defs.h ind.h back.h seq.h gen.h genback.h |
Main Parallel | mainpar.o | mainpar.c | defs.h ind.h back.h par.h gen.h genback.h |
Main Backprop. | mainback.c | mainback.c | defs.h ind.h back.h sim.h |
Most modules require an initialisation to allocate arrays, to setup local variables or hardware, or to process command line options passed to the program. For this purpose, the following functions and variables are declared in the interface (i.e. the header file):
Mod stands for the module names Seq, Par, Sim, Ind, Net (also declared in ind.h for network initialisation), Std (declared in stdnet.h and implemented in the problem definition), Gen, Back and Out (defined by the main programs for output handling). These routines are either called directly form the main program or by the corresponding routines of the parent module reflecting the object oriented concept of inheritance.
In the following module descriptions, only variables and functions directly related to the implemented algorithms are mentioned. For auxiliary and system or hardware specific functions, please refer to the source code.
Source: | defs.h | declarations of standard types and functions | |||
defc.c | implementation |
Programs: | all |
---|
Options: | none |
---|
Parent: | none |
---|
This module contains commonly used constants, type declaration and auxiliary functions for bit manipulation and random numbers.
Source: | seq.h | declarations of sequential features | |||
seq.c | implementation |
Programs: | encseq | sequential genetic ENC/DEC problem | |||
cntseq | sequential genetic 1-norm problem | ||||
cmpseq | sequential genetic comparator |
Options: | -p![]() |
population size | p=100 | ||||
-g![]() |
maximum number of generations |
![]() |
|||||
-e![]() |
maximum error for success | ![]() |
|||||
-s![]() |
random seed value |
![]() |
Parent: | none |
---|
This module contains all functions, specific to the sequential execution of the genetic and combined algorithm and is, like the module Simulation a mere placeholder, since no network functions or special initialisations have to be defined.
Variables and Functions
Source: | defs.h | declarations of parallel features | |||
sefc.c | implementation |
Programs: | encseq | parallel genetic ENC/DEC problem | |||
cntseq | parallel genetic 1-norm problem | ||||
cmpseq | parallel genetic comparator |
Options: | -p![]() |
population size | p=100 | ||||
-g![]() |
maximum number of generations |
![]() |
|||||
-e![]() |
maximum error for success | ![]() |
|||||
-s![]() |
random seed value |
![]() |
|||||
-t![]() |
global selection every ![]() |
![]() |
Parent: | none |
---|
This module contains all functions specific to the parallel execution of the genetic and combined algorithm on the transputer network and uses the Meiko CS-Tools library.
Variables and Functions
Source: | defs.h | declarations of sequential backpropagation features | |||
sefc.c | implementation |
Programs: | encback | backpropagation ENC/DEC problem | |||
cntback | backpropagation 1-norm problem | ||||
cmpback | backpropagation comparator |
Options: | -g![]() |
maximum number of iterations |
![]() |
||||
-e![]() |
maximum error for success | ![]() |
|||||
-s![]() |
random seed value |
![]() |
Parent: | none |
---|
This module is the backpropagation equivalent to the module Sequential and is also merely a placeholder.
Variables and Functions
Source: | ind.h | declaration of individual and network features |
Programs: | all |
---|
Options: | none |
---|
Parent: | none |
---|
This virtual module contains variable and function declaration for the individual definition in the genetic algorithm including network topology and training sets, which are also used for backpropagation. The actual implementation are left to the derived modules. This allows to use the genetic programs for any kind of phenotypes.
The actual implementations for 2-layer neural networks is left to the derived module Standard Net.
Declarations
Source: | stdnet.h | declarations for 2-layer ![]() ![]() ![]() |
|||
stdnet.c | implementation |
Programs: | all |
---|
Options: | -B![]() |
number of bits ![]() |
![]() |
||||
-W![]() |
weights in interval ![]() |
![]() |
|||||
-E![]() |
error estimation factor | ![]() |
|||||
-b![]() |
no. of backprop. steps for combined alg. | ![]() |
Parent: | Individual |
This module contains the implementation for 2-layer networks of the functions declared in the module Individual. The actual topology, as well as the training set, is, however, determined by the problem definition via the ``virtual'' functions initStd and initTrain.
The individual options -B, -W, -E and -b are recognised by initInd and ignored, when only the backpropagation initNet is called.
Variables and Functions
Source: | gen.h | declaration of the genetic algorithm | |||
gen.c | implementation |
Programs: | encseq, cntseq, cmpseq | sequential versions | |||
encpar, cntpar, cmppar | parallel versions |
Options: | -m![]() |
percentage of mutations | ![]() |
||||
-n![]() |
perform ![]() |
![]() |
|||||
-c![]() |
percentage of reproduction (copies) | ![]() |
|||||
-u![]() |
percentage of uniform selections | ![]() |
|||||
-d![]() |
decimation factor | ![]() |
|||||
-h![]() |
size of internal hashtable | ![]() |
Parent: | none |
---|
This modules contains the variables and functions for the genetic algorithm. The chromosome strings (type ind) are arrays of unsigned integers; all genetic operators work on this representation by directly manipulating the bits.
Variables and Functions
Source: | back.h | declaration of the backpropagation algorithm | |||
back.c | implementation |
Programs: | all |
---|
Options: | -o![]() |
use online learning (0/1) | ![]() |
||||
-k![]() |
learn rate | ![]() |
|||||
-a![]() |
impulse factor | ![]() |
|||||
-w![]() |
range of initial weights ![]() |
w=1 |
Parent: | none |
---|
This module contains the backpropagation algorithm as described in Section 4.3.
Variables and Functions
Source: | back.h | declarations for the combined algorithm | |||
back.c | implementation |
Programs: | encseq, cntseq, cmpseq | sequential versions | |||
encpar, cntpar, cmppar | parallel versions |
Options: | none |
---|
Parent: | none |
---|
This module implements special function for the combined genetic backpropagation algorithm (Section 5.4).
Variables and Functions
Source: | mainseq.c | main program for the sequential genetic alg. | |||
mainpar.c | main program for the parallel genetic alg. | ||||
mainback.c | main program for sequential backpropagation |
Programs: | encseq, cntseq, cmpseq | sequential versions ( mainseq.c) | |||
encpar, cntpar, cmppar | parallel versions ( mainpar.c) | ||||
encback, cntback, cmpback | backpropagation ( mainback.c) |
Options: | -l![]() |
frequency of log-output | automatic | ||||
-f![]() |
log momentarily best network | ![]() |
|||||
-i![]() |
show parameter info | ![]() |
|||||
-r![]() |
show calculation statistics | ![]() |
Parent: | none |
---|
These modules contain the main-procedures for all executables. They mainly consist of a loop which performs the genetic or backpropagation iterations and produces log-output. The output options are the same for all three modules.