190 likes | 294 Vues
This project explores the comparison of Direct and Indirect Encoding methods in evolving shapes through Genetic Algorithms (GAs). The aim is to develop an intuitive GUI that allows real-time visual demonstrations of shape evolution. The project evaluates the performance of these techniques while addressing scalability issues inherent in GAs. By implementing Implicit Embryogeny, we analyze its efficacy in enhancing scalability and performance. Experiments reveal that indirect encoding significantly improves outcomes, though it may reduce diversity. The findings underscore the pros and cons of each encoding method.
E N D
Department of Electronic Engineering NUIG Evolving Shapes using Direct & Indirect Encodings By: John Brennan Supervisor: John Maher
Aim of Project • To compare and contrast the use of Direct and Indirect Encoding methods to evolve shapes • To develop a visually impressive GUI to demonstrate the evolving shapes in real time • To facilitate user input of evolution parameters in the developed GUI
Project Specifications • Review of Implicit Embryogeny proposed by Kumar plus 2 other authors • Write a Java GA to solve 1’s max problem • Demonstrate some Java 2D GUI features • Extend the developed GUI to include GA functionality • Design and verify demonstrator of Implicit Embryogeny • Include Implicit Embryogeny within the developed GUI • Add additional frame to user to define target phenotype • Compare and contrast directly evolved shapes with implicitly derived shapes
Introduction to Genetic Algorithms • A Genetic Algorithm is a programming technique that imitates biological evolution to solve complex problems • A GA performs the following: • It takes a set of potential solutions (a population) • Using a selection mechanism new offspring are created from nominated parents • Genetic Operators are carried out on the offspring • The fitness of the modified offspring is evaluated • New offspring replaces previous population (a generation)
The Scalability Problem • As the size of the problem increases it reaches a point where the GA will become too inefficient to run (shown by the table below) • It is therefore necessary to implement an alternative encoding method to combat the problem of scalability
Implicit Embryogeny • An Embryogeny is a process of growth where genotypes are mapped onto phenotypes • Implicit Embryogeny is a process which uses interacting rules to solve complex problems • Each genotype consists of a number of rules, and each rule has a precondition and an action • If the preconditions are met, i.e. they exceed a preset threshold, the action is carried out. • The growth is carried out in a phenotype grid
Program Design • A Java based experimental platform has been developed as part of this project • Used to visually demonstrate how the shape is evolving in Real Time • Genetic Algorithm cycles through the generations in a background process • Used to carry out experiments to demonstrate the differences between direct and indirect encoding methods
GUI Main Panel • The main panel of this GUI displays two grids • the one on the right displays the target phenotype shape • the one on the left displays the current mapping of the genotype to phenotype • The target phenotype can be selected from a number of predefined shapes which are hard coded into the application
GUI Parameters Panel • The user can select if the phenotype grid should be developed using a direct or an indirect encoding method • Only text fields relevant to the current encoding technique are editable • It is dependant of the selection of a radio button which determines which text fields are masked and which can be edited • Changes in these values can have a significant effect on the results of the GA
Results from Experiments • The experiments were performed ten times in order to obtain the average performance • GA performs well without the use of an embryogeny for smaller grid sizes but it does not scale well • Results show the improved performance with the implementation of using an embryogeny
Conclusions • Use of indirect encoding methods to evolve shapes proved to show a much higher level of performance • It has also proven that the scalability problem does not affect the evolution of a phenotype which used Implicit Embryogeny to develop the desired shape. • This encoding method does have its disadvantages • It does not retain the same diversity possessed by a phenotype evolved without using an embryogeny