1 / 20

Investigation of the Effect of Neutrality on the Evolution of Digital Circuits.

Investigation of the Effect of Neutrality on the Evolution of Digital Circuits. . Eoin O’Grady Final year Electronic and Computer Engineering Project. Project Goals.

idalee
Download Presentation

Investigation of the Effect of Neutrality on the Evolution of Digital Circuits.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Investigation of the Effect of Neutrality on the Evolution of Digital Circuits. Eoin O’Grady Final year Electronic and Computer Engineering Project.

  2. Project Goals • Design and create a Genetic Algorithm capable of implementing Cartesian Genetic Programming (evolution of Digital Logic Circuits). • To study and analyse the concept of Neutrality in Genetic Algorithms. • To develop an explicit Neutral Mutation Operator. • To implement this Neutral Mutation Operator with Cartesian Genetic Programming to evolve complex Digital Logic Circuits.

  3. Genetic Algorithms and Evolution • Genetic Algorithms are search algorithms based on the mechanics of natural selection and natural genetics. • They combine survival of the fittest among string structures and with a structured yet randomized information exchange to form a search algorithm. • In every generation a new set of artificial creatures (strings) is created using the parts of the fittest members of the previous generation, with an occasional new part (mutation) thrown in to ensure the population doesn't become homogenized. • There are four basic operations within Genetic Algorithms they are evaluation, selection, crossover and mutation.

  4. Member[0] fitness=4 Member[1] fitness=7 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 Genetic Algorithms and Evolution Evaluation • When every new population is created each member is evaluated for it’s fitness by testing for some attribute. Selection • Individuals are selected at random in groups after they are evaluated for their fitness and the individuals with the highest fitness within these groups are used to populate the new generation. Member[2] fitness=7 Member[7] fitness=5 Member[8] fitness=6 Member[5] fitness=4 Member[2] fitness=7 Member[7] fitness=5

  5. Genetic Algorithms and Evolution Crossover • Crossover is used to produce the new members of a population a point is chosen at random on a chromosome where it will be split and joined with the other half of another chromosome split at the same point. Mutation • Mutation occurs to some of the genes in the new population. A point is picked at random within a chromosome and the mutation that occurs is random. Member[2] fitness=7 Member[1] fitness=5 1 1 1 1 1 1 0 1 0 0 0 1 1 1 1 1 NewMember[0] fitness=8 1 1 1 1 1 1 1 1 NewMember[0] fitness=8 NewMember[0] fitness=8 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1

  6. Cartesian Genetic Programming • CGP is an advanced implementation of Genetic algorithms created by Julian miller and allows solutions to more complicated problems to be evolved (usually digital logical problems). • In CGP the individual genes of a genotype (chromosome) consist of more than a single integer value. Typically they have multiple values that represent inputs and a single value that represents an operation. The Genotype • The genotype is made up of many genes which all together represent a system. A C -3 A C 0 B D -3 B D 0 B 1 0 D 1 0 3 4 -1 0 0 0 1 2 -3 5 6 -1 Genes

  7. Cartesian Genetic Programming The Phenotype • When the data contained in the genotype is converted to simulate the system described within it becomes known as the phenotype and the genes within are known as cells. A C -3 A C 0 B D -3 B D 0 B 1 0 D 1 0 3 4 -1 0 0 0 1 2 -3 5 6 -1 A B C D

  8. Cartesian Genetic Programming Evolving the Genotype • A population of genotype is evolved in exactly the same way as a normal genetic algorithm with evaluation, selection, crossover and mutation. • When evaluating each genotype it must be first mapped to it’s phenotype. • Then all permutations of the inputs are applied and then each cell output is tested against a truth table of the desired outputs. The most suitable cells for output are used to define the genotype’s fitness.

  9. Fitness Fitness Solution Spectrum Solution Spectrum Neutrality • Neutrality is the concept that when trying achieve a better solution of any classification that by first pursuing a change in the solution which does not make the solution better that eventually this will help the solution to find a change that will increase it’s fitness. • For any Search Algorithm, in particular Genetic Algorithms, that relies on a cost function, i.e. calculation of fitness, to determine it’s next area of search on a fitness landscape there are areas where there will be no local path along which the search algorithm will find an area of higher fitness.

  10. The Fitness Landscape • The term Fitness Landscape is used when describing any evolutionary process, be it biological, technological or digital, to describe a landscape which is drawn along the spectrum of possible “solutions” for a given problem. • In GA the landscape is arranged such that each neighbouring solution is just one mutation different from it’s neighbour and the height of this landscape corresponds to the suitability i.e. the fitness level for a given solution. • The horizontal distance between two points is an inverse measure of probability of mutation

  11. Neutrality on a Fitness Landscape • Neutrality in the context of fitness landscapes and genetic algorithms refers to effect of changing a solution’s description or chromosome in some way so that it’s fitness level is unchanged by the change in the chromosome. • A neutral mutation is the implementation of neutrality on a fitness landscape. • If a genetic algorithm is stuck on a peak which is not the global maximum of fitness landscape then a neutral mutation (a mutation which is intended to mutate the current solution so that we get another with equal or greater fitness).

  12. The N-K Model • In the N-K model there are N distinct processes (cardinality of a gene) that exist in S amount of different states (length of chromosome). Therefore there are S to the power of N possible solutions. • In the NK–model each process makes a contribution to the overall performance of the solution that depends on it’s own type and the types of K other solutions. Therefore K<=N-1. • K determines the correlation of the landscape that is when K=0 the correlation is high and the fitness landscape has a single smooth sided peak. • As K increases the ruggedness also increases and when K=N-1 the fitness landscape is at it’s most rugged. • The correlation coefficient is calculated by (Weinberger, 1990; Fontana et al., 1993): ρ(d)=[1-d/N][1-K/(N-1)]^d and thus for d=1 and large N, K=0 implies ρ(1)≈1 and K=N-1 has ρ(N)=0

  13. Neutrality using the N-K Model • To investigate further the effect of neutrality on the N-k model we must now impose a new operator M which will split the fitness landscape into M number of layers through which a population will be allowed to freely and randomly travel

  14. Intrinsic Neutral Mutation in Genetic Algorithms • Neutral Mutation occurs ‘naturally’ in Genetic Algorithms. • Example: 3,1,0;0,2,-2;1,3,-3;4,1,0;0,2,0;1,8,-2;8,6,-3;4,0,-1;4,8,-1;2,0,-3; 47.0 13;10;12; (From generation 70) 3,1,0;4,2,-3;1,3,-3;2,1,0;0,2,0;6,8,-3;7,6,-3;1,7,0;4,8,-1;2,0,-3; 47.0 13;9;12; (From generation 81) 3,1,0;1,2,-3;1,3,-3;6,1,-3;0,2,0;6,8,-3;8,6,0;10,4,-1;4,8,-1;2,0,-3; 48.0 13;9;11; (From generation 83) F I tness Possible Mutations

  15. The effects of intrinsic neutral mutation • Problems arise for intrinsic neutral mutations when a population has converged on a large neutral plateau. Fitness Possible Mutations After many generations Fitness Possible Mutations

  16. Fitness Possible Mutations The effects of Explicit Neutral Mutation • For the scenario that a population has evolved on a peak:

  17. Fitness Fitness Fitness Possible Mutations Possible Mutations Possible Mutations The effects of Explicit Neutral Mutation • For the scenario that a population has converged on a plateau: Fitness Possible Mutations After several neutral mutations

  18. Neutral Mutation on a Known Fitness Landscape • In order to properly develop and implement a neutral mutation operator for use on a fitness landscape that was complex, extremely rugged, incredibly large and above all unknown, it was necessary to first develop a method of implementing it on a landscape that was known. • A GA was programmed to find the global maximum for the mathematical function Sinc(x+y).

  19. Neutral Mutation on a Known Fitness Landscape • The GA used a Neutral Mutation Operator which kicked in whenever the population was converged on a peak/plateau. • The gene structure took the form of binary values with a total chromosome length of 18, 9 genes each for x and y. • One gene was for the sign of the integer four made up the values greater than zero and four were values less than zero (i.e. down to 2-4 which gave a total range of -15.9375 to 15.9375). • These integer values were then used to calculate the fitness by the equation: Fitness=Sin(√(x^2 +y^2) √(x^2 +y^2)

  20. Project Milestones • 1. Research Genetic Algorithms and Cartesian Genetic Programming particularly the work of Julian Miller. • 2. Start working with basic GA software (in the form of Java classes) and set conditions to solve basic one max GA once classes are compiled and evolve successfully • 3. Design and implement a CGP simulator which when passed a genetic algorithm will synthesis a basic logic operator circuit and produce outputs for each genotype. • 4. Create a suitable method for displaying a CGP Genotype as a basic logic circuit (the CGP grid with Cells). • 5. Use this simulator with the Genetic Algorithm software to evolve a 2- bit adder and other simple circuits. • 6. Research Neutrality and then experiment with different methods to design and implement a neutral mutation operator. • 7. Evolve a more complicated circuit such as a 3-bit multiplier using the neutral mutation operator with the GA software and CGP simulator. • 8. Using JBits (a Java API) design a new evolvable circuit to instantiate the CGP model of a basic logical circuit on an FPGA. • 9. Design fault injection method and determine methods to handle these faults i.e. To be able to pull the outputs from different nodes on the FPGA board in order to get an output of similar fitness.

More Related