Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Evolutionary Algorithms: Applied Computation and Nature-Inspired Methods, Exercises of Pattern Classification and Recognition

This lecture provides an introduction to evolutionary algorithms, a type of nature-inspired algorithm used in artificial intelligence. It covers the basic scheme of an evolutionary algorithm, its main components, and examples like the eight-queens problem. The lecture also discusses the evolutionary computing metaphor, the two pillars of evolution, and the different types of evolutionary algorithms.

Typology: Exercises

2021/2022

Uploaded on 11/04/2024

estabraq-hussein-1
estabraq-hussein-1 🇮🇳

1 document

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Evolutionary
Algorithms [AI420]
An Introduction to Applied Evolutionary Computation
and Nature-Inspired Algorithms
Lecture 3 SPRING 2024
HELWAN UNIVERSITY
by Amr S. Ghoneim
Faculty of CS & AI
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Evolutionary Algorithms: Applied Computation and Nature-Inspired Methods and more Exercises Pattern Classification and Recognition in PDF only on Docsity!

Evolutionary

Algorithms [AI420]

An Introduction to Applied Evolutionary Computation

and Nature-Inspired Algorithms

Lecture 3

HELWANUNIVERSITY

byAmrS.Ghoneim

Faculty of CS & AI

Helwan University – Faculty of Computer Science & Artificial Intelligence

SPRING 2024

Evolutionary Algorithms [AI420]

  • An Introduction to Applied Evolutionary Computation and Nature-Inspired Algorithms Lecture 3
    • What is an Evolutionary Algorithm? ▪ Scheme of an Evolutionary Algorithm (EA) ▪ Main EA components: ▪ Representation/Evaluation/Population | Parent–Selection/Survivor–Selection | Recombination/Mutation ▪ Examples: Eight-Queens Problem ▪ Typical EA Behaviour byAmrS.Ghoneim

General Scheme of Evolutionary Algorithms Population Parents Parent Selection Survivor Selection Offspring Recombination (Crossover or Reproduction) Mutation Population Intialisation Termination Conditions

Scheme of an Evolutionary Algorithm EA Scheme in Pseudo-Code

Scheme of an Evolutionary Algorithm Two Pillars of Evolution There are two competing forces: Increasing population diversity by genetic operators:  Recombination  Mutation Push towards novelty .. Decreasing population diversity by selection:  of Parents  of Survivors Push towards quality ..

Main EA Components: Representation o Role: Provides code for candidate solutions that can be manipulated by variation operators. o Leads to two levels of existence:

  • Phenotype: object in original problem context, the outside
  • Genotype: code to denote that object, the inside (chromosome, “digital DNA”) o Implies two mappings:
  • Encoding : phenotype=> genotype
  • Decoding : genotype=> phenotype o Chromosomes contain genes, which are in (usually fixed) positions called loci (sing. locus) and have a value (allele).

Main EA Components: Evaluation [Fitness] Function Role: o Represents the task to solve and the requirements to adapt to (can be seen as “the environment”). o Enables selection (provides the basis for comparison). For example, some phenotypic traits are advantageous or desirable, e.g. big ears cool better; these traits are rewarded by more offspring that will expectedly carry the same trait. A.k.a. quality function or objective function. o Assigns a single real-valued fitness to each phenotype, which forms the basis for selection. o So, the more discrimination (different values) the better. o Typically, we talk about fitness being maximised. Some problems may be best posed as minimisation problems, but conversion is trivial

Main EA Components: Population Role: o Holds the candidate solutions of the problem as individuals (genotypes). Formally, a population is a multi-set of individuals, i.e. repetitions are possible. Population is the basic unit of evolution, i.e., the population is evolving, not the individuals. Selection operators act on the population level. Variation operators act on the individual level.

Main EA Components: Selection Mechanisms Role: o Identifies individuals:

  • to become parents,
  • to survive. o Pushes population towards higher fitness o Usually probabilistic;
  • High-quality solutions are more likely to be selected than low-quality,
  • but NOT guaranteed.
  • Even the worst in the current population usually has a non-zero probability of being selected o This stochastic nature can aid escape from local optima.

Example: Roulette Wheel Selection fitness(A) = 3 fitness(B) = 1 fitness(C) = 2

A

C

1/6 = 17% 3/6 = 50%

B

2/6 = 33% Main EA Components: Selection Mechanisms In principle, any selection mechanism can be used for parent selection and survivor selection.

Main EA Components: Variation Operators Role: o To generate new candidate solutions o Usually divided into two types according to their arity (number of inputs):

  • Arity 1 : mutation operators.
  • Arity > 1 : recombination operators.
  • Arity = 2 typically called crossover.
  • Arity > 2 is formally possible, seldom used in EC. o There has been much debate about relative importance of recombination and mutation
  • Nowadays most EAs use both.
  • Variation operators must match the given representation.

Main EA Components: Mutation Role: o Causes small, random variance. o Acts on one genotype and delivers another. o The element of randomness is essential and differentiates it from other unary heuristic operators. The importance ascribed depends on representation and historical dialect: Binary GAs – background operators responsible for preserving and introducing diversity EP for FSMs / continuous variables – only search operator GP – hardly used It may guarantee the connectedness of search space and, hence, convergence proofs.

Main EA Components: Recombination Role: o Merges information from parents into offspring. o Choice of what information to merge is stochastic. o Most offspring may be worse, or the same as the parents. o Hope is that some are better by combining elements of genotypes that lead to good traits. o Principle has been used for millennia by breeders of plants and livestock.

1 1 1 1 1 1 1 0 0 0 0 0 0 0

Parents

cut cut

Offspring

Main EA Components: Recombination 1 1 1 0 0 0 0 0 0 0 1 1 1 1