Reference for Soft_Computing unit-5
Reference for Soft_Computing unit-5
2. Working Principle of GA
GAs operate based on the principles of evolution and survival of the fittest:
1. Initialization: Randomly generate an initial population.
2. Fitness Evaluation: Measure how well individuals meet the objective using a fitness
function.
3. Selection: Choose individuals for reproduction based on fitness.
4. Crossover (Recombination): Combine genetic information of parents to create offspring.
5. Mutation: Introduce random changes to maintain diversity.
6. Termination: Stop when a termination condition is met (e.g., max iterations or desired
fitness).
3. Procedures of GA
1. Start: Define the problem and initialize parameters.
2. Population Initialization: Generate the initial population.
3. Evaluation: Calculate fitness for each individual.
4. Selection: Select individuals for reproduction.
5. Crossover: Exchange genetic material to create offspring.
6. Mutation: Apply random modifications to offspring.
7. Replacement: Form a new generation from offspring and parents.
8. Repeat: Loop until the stopping criterion is satisfied.
9. Output: Return the best solution.
4. Flow Chart of GA
Steps in the Flowchart:
1. Start and define objectives.
2. Initialize population randomly.
3. Evaluate fitness.
4. Check termination condition.
• If met, output the best solution.
• Else, proceed.
5. Apply selection.
6. Perform crossover.
7. Introduce mutations.
8. Form a new generation and repeat the process.
7. Genetic Operators
1. Crossover: Combines parent chromosomes to produce offspring.
• Single-Point Crossover: Exchange after a specific point.
• Two-Point Crossover: Exchange between two points.
• Uniform Crossover: Randomly swap genes.
2. Mutation: Introduces randomness to maintain diversity.
• Bit Flip Mutation: Change a bit in binary encoding.
• Swap Mutation: Swap genes in permutation encoding.
8. Mutation
Mutation helps maintain diversity in the population, preventing premature convergence. It ensures
the algorithm explores new solutions and avoids getting trapped in local optima.
• Purpose: Introduce variability in the genetic material.
• Rate: Controlled by a mutation probability, typically low (e.g., 1%).
9. Generational Cycle
A generational cycle in GA includes:
1. Evaluating fitness for all individuals.
2. Selecting parents for reproduction.
3. Generating offspring through crossover and mutation.
4. Replacing the current population with the new generation.
5. Repeating until the stopping criteria are met.
10. Applications of GA
Genetic Algorithms are widely used in diverse fields for optimization and problem-solving:
• Engineering: Design optimization, control systems.
• Finance: Portfolio optimization, risk management.
• Bioinformatics: DNA sequence alignment, drug design.
• Machine Learning: Hyperparameter tuning.
• Scheduling: Resource allocation, job scheduling.
• Games: AI strategies and game level generation.