0% found this document useful (0 votes)
18 views3 pages

Reference for Soft_Computing unit-5

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Reference for Soft_Computing unit-5

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Basic Concepts of Genetic Algorithm (GA)


A Genetic Algorithm (GA) is a search and optimization technique inspired by the principles of
natural selection and genetics in biological systems. It mimics evolution through selection,
crossover, and mutation to solve complex problems.
• Key Concepts:
• Population: A group of potential solutions.
• Chromosomes: Encoded solutions (e.g., binary strings).
• Fitness Function: Evaluates the quality of each solution.
• Generational Cycle: Evolution process through genetic operators.

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.

5. Genetic Representations (Encoding)


Genetic representation defines how potential solutions are encoded as chromosomes. Common
methods include:
• Binary Encoding: Chromosomes are represented as binary strings (e.g., 101011).
• Integer Encoding: Chromosomes consist of integer values.
• Permutation Encoding: Suitable for ordering problems, like the Traveling Salesman
Problem (TSP).
• Real-Value Encoding: Chromosomes use real numbers for continuous problems.

6. Initialization and Selection


1. Initialization: Randomly create an initial population, ensuring diversity.
2. Selection: Select individuals for reproduction based on their fitness:
• Roulette Wheel Selection: Probability-based selection.
• Tournament Selection: Compete among a subset of individuals.
• Rank Selection: Rank individuals and select based on rank probabilities.
• Elitism: Preserve the best individuals for the next generation.

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.

You might also like