Genetic Programming and Protocol Construction
Genetic Programming and Protocol Construction
MSc Project Implementation Page

This web page provides the implementation details for the project in genetic programming and protocol construction for the degree of Master of Science in Distributed Interactive Systems. The separate programs for each of the separate parts of the implementation are listed as separate pages. They are grouped together in relation to their description in the dissertation. Therefore, all files based in one chapter are placed together.

Chapter 2
 

The genetic program for generating the program for y= x+(x*x)+(x*x*x)+(x*x*x*x) is implemented using the following four files:
 

Filename

Description

Interface for using the genetic program 
Fitness function
Sets the parameters of the genetic program run
Set the parameters for initialising the genetic program

The genetic program for y=(x*x)/2 is very similar to the code above, so is not included for conciseness. However, the code above can generate the function if the intended function in the fitness test is altered to j*j/2. 

 

Chapter 4

Two main tasks are identified to create a genetic program using the genetic programming toolkit. 1. Create a terminal class for each protocol layer used in the terminal sets of chapter 5 and 6. 2. Create the (:) function for stacking layers on top of one another . These can then be used to set parameters of the experiments in chapters 5 and 6.

 
The following is the code for the 13 terminal layers used in this project:

 

File

Description

Defines the UDP genetic programming primitive for use in the terminal set 
Defines the NAKCK genetic programming primitive for use in the terminal set 
Defines the UNICAST genetic programming primitive for use in the terminal set 
Defines the GMS genetic programming primitive for use in the terminal set 
Defines the FLUSH genetic programming primitive for use in the terminal set 
Defines the FD genetic programming primitive for use in the terminal set 
Defines the FD_RAND genetic programming primitive for use in the terminal set 
Defines the MACK genetic programming primitive for use in the terminal set 
Defines the MNAK genetic programming primitive for use in the terminal set 
Defines the PING genetic programming primitive for use in the terminal set 
Defines the STABLE genetic programming primitive for use in the terminal set 
Defines the VIEW_ENFORCER genetic programming primitive for use in the terminal set 
Defines the TOTAL genetic programming primitive for use in the terminal set 


 

One function class needs to be created for appending stack layers together (:). The code for this is found in the following:

The other common element of the experiments is the Protocol Server of the distributed system, which controls the tests that are performed on each stack. Its implementation is described in the following files:


 

File

Description

Interface for ProtocolImpl object
Implementation of Object for providing test methods
Implementation of Server on which the object is created

Chapter 5 – Reliable Pt2Pt experiment

This section provides the program code for the implementation of the genetic program that produces a reliable point-to-point protocol. The files are split into two tables: the code for creating the genetic algorithm side and the code for implementing the test harness:

 
Filename
Description
Main interface for the genetic program – allows Population and generation parameters to be altered on start up
Fitness function for measuring how well the generated stacks perform
Set the parameters of the GP run – crossover prob. Mutation probability etc.
Create the initial properties of the GP – terminal set, function set


 

The fitness function calls two methods from the ProtocolImpl method above. However, these methods use extra servers and objects to create a Pt2Pt application. A sending object and a receiving object. These are implemented using the following:
 


 
 

Filename

Description

Interface for SendingImpl object
Implementation of Object for providing sending methods for the two experiments
Implementation of a server on which the SendingImpl object is created
Interface for ReceivingImpl object
Implementation of Object for receiving methods for the first experiment
Implementation of a server on which the ReceivingImpl object is created


 
 

Chapter 6 – Reliable Ordered Multicast Experiment

For the extended experiement a new set of genetic program code is created ie. for the new parametes this is contained in the following four files:

 
Filename
Description
Main interface for the genetic program – allows Population and generation parameters to be altered on start up
Fitness function for measuring how well the generated stacks perform
Set the parameters of the GP run – crossover prob. Mutation probability etc.
Create the initial properties of the GP – terminal set, function set


 

The tests run on the basic distributed system that uses the ProtocolImpl code and the SendingImpl code. However ReveivingImpl is replaced by the MulticastImpl
object which is created using the following files:
 
 

Filename

Description

Interface describing methods on the remote object
Implementation of the MulticastImpl object and the four main methods it provides
Server on which the multicast object is created


The final piece of code used in the tests was the creation of the JUMBLE micro-protocol, whose code is found here: