The fitness of a solution is measured, how best it gives the result
For instance, Knapsack problem
Fitness Function = Total value of the things in the knapsack
10.
Simple Genetic Algorithm Step 1: Encoding of the problem in a binary string Step 2: Random generation of a population Step 3: Calculate fitness of each solution Step 4: S elect pairs of parent strings based on fitness Step 5: Generate new string with crossover and mutation until a new population has been produced Repeat step 2 to 5 until satisfying solution is obtained
The process of representing the solution in the form of a string
Binary Encoding – E very chromosome is a string of bits, 0 or 1
Ex: Knapsack Problem Encoding: Each bit specifies if the thing is in knapsack or not
010011001100 Chromosome B 101101100011 Chromosome A
12.
Permutation Encoding – Every chromosome is a string of numbers, which represents the number in the sequence. Used in ordering problems. Ex: Traveling Sales Person Problem Encoding: Chromosome represents the order of cities, in which the salesman will visit them Contd.. 8 5 6 7 2 3 1 4 9 Chromosome B 1 5 3 2 6 4 7 9 8 Chromosome A
13.
Value Encoding – Every chromosome is a string of some values. Values can be form numbers, real numbers or characters. Ex: Finding weights for neural network The problem : To find the weights of synapses connecting input to hidden layer and hidden layer to output layer Encoding: Each value chromosome represent the corresponding weights Contd.. Chromosome A 1.2324 5.3243 0.4556 2.3293 2.4545 Chromosome B ABDJEIFJDHDIERJFDLDFLFEGT Chromosome C (back), (back), (right), (forward), (left)
Tree Encoding – E very chromosome is a tree of some objects, such as functions or commands in a programming language
Used for evolving programs or expressions in Programming Languages
Ex: Finding a function from given values The problem: Some input and output values are given. Task is to find a function, which will give the best output to all inputs Encoding: Chromosome are functions represented in a tree
Main idea: First ranks the population and then every chromosome receives fitness from this ranking
The worst will have fitness 1, second worst 2 etc. and the best will have fitness N
After this all the chromosomes have a chance to be selected. But this method can lead to slower convergence, because the best chromosomes do not differ so much from other ones
Disadvantage: the population must be sorted on each cycle
In designing composite materials and aerodynamic shapes for race cars and regular means of transportation (including aviation) can return combinations of best materials and best engineering to provide faster, lighter, more fuel efficient and safer vehicles
the process can be done much quicker and more efficiently by computer modeling using GA searches to return a range of options for human designers
To optimize the structural and operational design of buildings, factories, machines, etc. is a rapidly expanding application of GAs
Used to optimizing the design of heat exchangers, robot gripping arms, satellite booms, building trusses, flywheels, turbines, and just about any other computer-assisted engineering design application.
Robotics involves human designers and engineers trying out all sorts of things in order to create useful machines that can do work for humans
GAs can be programmed to search for a range of optimal designs and components for each specific use, or to return results for entirely new types of robots that can perform multiple tasks and have more general application
Traveling Salesman Problem or TSP can be used to plan the most efficient routes and scheduling for travel planners, traffic routers and even shipping companies
The shortest routes for traveling and the timing to avoid traffic tie-ups and rush hours
GA contributed more to it than the travel agent did
39.
Conclusion Genetic algorithms are original systems based on the supposed functioning of the Living. The method is very different from classical optimization algorithms. These algorithms are nevertheless extremely efficient, and are used in many fields.
Views
Actions
Embeds 0
Report content