Genetic algorithm software testing ppt




















There are variety of techniques for test case generation but in this paper we will focus on genetic algorithm and particle swarm optimization technique. This paper will present the result of our research in into the application of GA and PSO search approach, to find optimal solution in the software construct.

Genetic algorithm is a part of evolutionary computing which is a growing field of Artificial Intelligence. GA exploits the historical information to direct the search in region of better performance with in the search space. Genetic Algorithms are more robust hence they are better than conventional AI Artificial Intelligence. GA does not break easily even if there is a slightly change in the input and it also does not get affected by noise. GA offer benefit over typical search of optimization problem in searching large state space, multimodal search space and n dimensional surface.

Distinct element in GA is individual and population. Individual represents single solution while population represents set of Solutions which is currently involved in this search process. Each individual is represented as chromosome.

That is an Initial pool of chromosomes. Population size can be few dozens to thousands. To do optimization fitness function is required to select the best solution from the population and 2. GA consists of following operators that is Selection Operator chromosomes are selected for cross-over based on the value of the fitness function Cross- Over Operator combine two chromosomes to produce new chromosomes.

Mutation Operator in this value is randomly changed to create new genes in the individual. Fitness of individual is calculated based on some fitness function. After the fitness is calculated selection of individuals is done based on the Roulette —Wheel Selection method i. Then Cross over operator is applied to produce new offspring in the population that may have better characteristics than their parents.

Mutation is done to introduce new individual in the population. It is similar to GA in the sense that both are evolutionary algorithms. It is one of the meta-heuristics approach that optimizes a problem and try to improve candidate solution iteratively.

PSO is generally used to solve those problems whose solution can be represented as a point in an n-dimensional space. In PSO potential solution is called particle. A number of particles are randomly set into motion through this space. Each particle posses its current position, current velocity ,and its pbest position. Pbest is the personal best position explored so far. It also incorporates Gbest that global best position achieved by all its individuals.

It is a simple approach and it is effective across a variety of problem domains. PSO starts with initialization of particle velocity and current position. Here particle is in 2-D space. Fitness value of the particle is calculated according to function. If the fitness of the particle is better than its previous value update particle x and y position that is its personal best position. Also if the value is better than gbest position update global best position of the particle.

Apply equations to update the x and y velocity vector of the particles. Process repeats until termination criteria is met or the optimal solution is found.

Implementation Genetic Algorithm is implemented in c language. X represent 5 digit unsigned binary integer. Four randomly generated solution to problem are 14,18,24, Fitness of the individual is calculated by the function F x.

String no. One point Crossover is performed in a couple. New offspring is generated. Mutation is performed. We get new generation Again the process is repeated till the maximum possible value of the solution is obtained. Luckily in this case in the second iteration we will get desired value.

Whereas In most of the cases GA traps in local optima. But here We have got the global optimum solution. Program will search for optimal solution through the movement of particle. Program will keep track of personal best and global best position of the particle and update its position and velocity. Optimal solution here is to minimize the mathematical function. PSO is implemented in C language. For more complex problems where it is not possible to easily solve the problem mathematically ,these algorithms can be used.

Figure 1 Movement of particles to find optimum solution Figure 2 Global best solution 4. GA suffers from the drawback that it traps in local optima, that is it does not know how to sacrifice short term fitness for long term fitness.

It does not keep in account the global best position of the individual. This drawback is overcome by Particle Swarm optimization technique which tracks the particle personal best position as well as global best position ,hence it moves toward global optima without getting trapped in local optima.

GA has been popular because of its parallel nature of search ,and essentially because it can solve non linear ,multi model problems. It can handle both Continuous and discrete variables where as PSO can easily handle Continuous variables.

Calculation of PSO Algorithm is very simple though it is difficult to implement with problem of non coordinate system. Many researchers have compared both the technologies. Conclusion PSO is relatively recent heuristic approach, It is similar to Genetic algorithm in a way that they both are population based evolutionary algorithms.

Paper described the basic concepts of GA and PSO ,how the test cases are generated using genetic algorithm and how they are useful in finding the optimal solution to the problem. The SlideShare family just got bigger. Home Explore Login Signup. Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Next SlideShares. You are reading a preview. Create your free account to continue reading. Sign Up. Upcoming SlideShare. What to Upload to SlideShare. Embed Size px. Start on. Show related SlideShares at end. WordPress Shortcode. Share Email. Top clipped slide. Download Now Download Download to read offline. Genetic algorithm ppt Aug. Mayank Jain Follow.

A few thoughts on work life-balance. Is vc still a thing final. The GaryVee Content Model. Mammalian Brain Chemistry Explains Everything. The AI Rush. Related Books Free with a 30 day trial from Scribd.

Related Audiobooks Free with a 30 day trial from Scribd. Elizabeth Howell. Genetic algorithm ppt 1.



0コメント

  • 1000 / 1000