Click here to Skip to main content
15,881,803 members
Articles / Programming Languages / C#

The Genetic Algorithm Framework – Part 8

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
7 Aug 2017MIT2 min read 3.6K   3  
Genetic Algorithm Framework

UPDATE: This article has now been integrated into the GAF documentation. The documentation can be found here.

Introduction

A piece of research completed in conjunction with the De Montfort University in 2013 demonstrated how the Genetic Algorithm Framework (GAF) could be used with a Software Defined Radio (SDR) system, to provide automatic frequency control (AFC).

The aim of AFC is to ensure that a radio system stays tuned to the desired frequency in conditions where the frequency is subject to change. The research demonstrated that a genetic algorithm (GA) can perform this task. In addition, the research showed how the GA can also handle very large changes in frequency such as the channel hopping nature of Cognitive Radio systems.

During the research, a Memory Operator was used in conjunction with an Auto-Mutate operator in order to improve the algorithm. The operator was subsequently added to the Genetic Algorithm Framework (GAF). This post describes how they can be used to improve GA performance.

How It Works

The operator maintains a ‘memory’ of solutions and ensures that the best solution in that memory is included in the GA population if it is better than the best in the population. The memory is kept up to date with good solutions during the GA run.

An Example

In an intelligent radio system such as the one described in the research cited above, a GA is used to search for and track a radio signal that is jumping around the radio spectrum (channel hopping). A GA without the memory operator needs to re-converge on the new frequency for each channel hop of the radio transmitter. Adding the memory operator tries to ensures that if a channel is reused, it will be found in memory and will be added to the population causing the GA to instantly converge on the new frequency. If the current channel hasn’t been used before, the GA will try and converge in the normal manner.

If the GA landscape is constantly changing such that the GA has to re-converge on a new solution, the memory operator could be used to improve the performance. As with all of these things experimentation will determine the best usage.

The following code adds the memory operator to the GA, sets the memory capacity to 100 ‘memories’ and specifies that the memory will be updated every 10 generations. The code may be more easily understood if read in conjunction with articles GAF Part 2 and GAF Part 3.

C#
var memory = new Memory(100, 10);
ga.Operators.Add(memory);

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
United Kingdom United Kingdom
John is the author of the free Genetic Algorithm Framework for .Net (GAF) and the series of GeoUK NuGet packages. John studied at Leicester De Montfort University and gained a Distinction for the highly regarded Masters Degree in Computational Intelligence and Robotics. John can provide commercial product support for the GAF or GAF based projects and can be contacted via the Code Project, LinkedIn or the usual social channels.

Comments and Discussions

 
-- There are no messages in this forum --