0% found this document useful (0 votes)
6 views7 pages

(PR5)

This document describes a student's practical report on performing genetic algorithm via Python programming to solve an optimization problem. It provides background on genetic programming as a problem-solving technique inspired by natural selection. The report outlines the procedure for implementing a genetic algorithm, including initializing a random population, evaluating fitness, selecting programs for reproduction, applying crossover and mutation, and repeating over generations until a solution is found. It then discusses applying these steps in Python code to optimize an unknown function and find its maximum value. The conclusion emphasizes the iterative nature of genetic algorithms allows for exploring solution spaces through variability introduced at each step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

(PR5)

This document describes a student's practical report on performing genetic algorithm via Python programming to solve an optimization problem. It provides background on genetic programming as a problem-solving technique inspired by natural selection. The report outlines the procedure for implementing a genetic algorithm, including initializing a random population, evaluating fitness, selecting programs for reproduction, applying crossover and mutation, and repeating over generations until a solution is found. It then discusses applying these steps in Python code to optimize an unknown function and find its maximum value. The conclusion emphasizes the iterative nature of genetic algorithms allows for exploring solution spaces through variability introduced at each step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

ROYAL UNIVERSITY OF

BHUTAN
JIGME NAMGYEL ENGINEERING
COLLEGE

Department of Electrical Engineering


Course: B.E. in Power Engineering

Module: Power System Optimization


Module Code: PEG408

Practical Report 5

Name: Sonam Lhendup Dorji


Roll No.: 05190014
Class: BE4PE
1) Aim: To perform genetic algorithm via python programming.
2) Theory:
Genetic programming stands as a computational paradigm rooted in the principles of natural
selection, aiming to tackle complex problems through the evolution of computer programs. As a
metaphorical counterpart to biological evolution, this approach begins with a diverse population of
potential solutions, each represented as a computer program. Through a series of generational
iterations, the fittest programs—those that perform the best in addressing the given problem—are
selected to undergo "crossover" and "mutation" operations, creating offspring that constitute the
subsequent generation. This evolutionary process continues until a solution deemed satisfactory is
attained.

In practical applications, genetic programming has found a significant foothold in machine


learning, particularly when dealing with optimization challenges and symbolic regression tasks. Its
ability to autonomously discover solutions without relying on predefined models makes it
particularly advantageous in scenarios where the problem's complexity demands adaptive and
exploratory strategies.

Despite these strengths, genetic programming is not without its limitations. The computational
intensity of the method often necessitates substantial time and resources to yield optimal solutions.
Furthermore, the evolved programs can become intricate and convoluted, posing challenges in
terms of human interpretability. This lack of transparency in the evolved solutions may limit their
applicability in contexts where a clear understanding of the decision-making process is essential.

In summary, genetic programming, inspired by the dynamics of natural selection, provides a


versatile and adaptive approach to problem-solving. While it excels in automated discovery and
non-linear optimization, considerations regarding computational demands and interpretability
should be weighed in its application.

3) Procedure:
1) Initialization: Start with a population of random computer programs representing potential
solutions to the problem.

2
2) Evaluation: Assess the fitness of each program by measuring its performance against the
problem's criteria.
3) Selection: Choose programs with higher fitness to "reproduce" and create the next generation.
4) Crossover: Combine parts of selected programs to create new offspring, simulating genetic
crossover.
5) Mutation: Introduce random changes to the programs, emulating genetic mutations.
6) Replacement: Replace the old generation with the new one.
7) Termination: Repeat the process for multiple generations until a satisfactory solution is found or
a termination criterion is met.

4) Analytical method:

3
4
5) Simulation method:

5
6
6) Result and discussion:

The best solution represented in the result displays optimum value of x after going through
selection, crossover and mutation processes. f(x) value represents the fitness value of the optimum
value of x or in other words, maximum value of f(x).

6) Conclusion:
In conclusion, each iteration of the genetic algorithm introduces variability through the generation
of new initial solutions, the selection of different parent candidates for genetic operations, and the
diverse paths leading to solution convergence. The iterative nature of genetic algorithms allows for
the exploration of solution spaces by iteratively modifying solutions through processes like
crossover, mutation, and selection. The inherent variability in stochastic optimization techniques
enables the algorithm to traverse multiple regions within the solution space. To mitigate the
impact of unpredictability and enhance reproducibility, it is common practice to seed the random
number generator at the commencement of the algorithm.

You might also like