Академический Документы
Профессиональный Документы
Культура Документы
Algorithms
• What are they?
– Evolutionary algorithms that make use of operations like
mutation, recombination, and selection
• Uses?
– Difficult search problems
– Optimization problems
– Machine learning
– Adaptive rule-bases
1
Genetic algorithm learning methods are based
on models of natural adaptation and evolution.
These learning systems improve their
performance through processes which model
population genetics and survival of the fittest.
In the field of genetics, a population is
subjected to an environment which places
demand on the members. The members which
adapt well are selected for mating and
reproduction. The offsprings of these better
performers inherit genetic traits from both
their parents.
Members of this second generation of offspring
which also adapt well are then selected for mating
and reproduction and the evolutionary cycle
continues. Poor performers die off without leaving
offspring . Good performers produce good
offspring and they, in turn, perform well. After
some number of generations, the resultant
population will have adapted optimally or atleast
very well to the environment. Genetic algorithm
systems start with a fixed size population of data
structures which are used to perform some given
tasks.
After requiring the structures to execute the
specified tasks some number of times, the
structures are rated on their performance and
a new generation of data structures is then
created. The new generation is created by
mating the higher performing structures to
produce offsprings. These offsprings and their
parents are then retained for the next
generation while the poorer performing
structures are discarded.
Genetic Algorithm
Set time t = 0
Initialize population P(t)
While termination condition not met
Evaluate fitness of each member of P(t)
Select members from P(t) based on fitness
Produce offspring from the selected pairs
Replace members of P(t) with better offspring
Set time t = t + 1
5
There are three genetic operations possible:
10
Traveling Salesman Problem
• For crossover we might take two paths (P1 and P2)
break them at arbitrary points and define new
solutions Left1+Right2 and Left2+Right1
• For mutation we might randomly switch two cites in
an existing path
11
Solving TSP using GA
Steps:
1. Create group of random tours
• Stored as sequence of numbers (parents)
2. Choose 2 of the better solutions
• Combine and create new sequences (children)
Problems here:
City 1 repeated in Child 1
City 5 repeated in Child 2
12
Modifications Needed
• Algorithm must not allow repeated cities
• Also, order must be considered
– 12345 is same as 32154
• Based upon these considerations, a computer
model for N cities can be created
• Gets quite detailed
13
Natural Language Processing
S ↔NP VP
NP ↔ Art N
NP ↔ N
VP ↔ V
VP ↔ V NP
Art ↔ a
Art ↔ the
N ↔ man
N ↔ dog
V ↔ bites
V ↔ likes
Parse the sentence : the dog bites the man using top
down parsing.
S ↔NP VP
S ↔Art N VP
S ↔ Art N V NP
S ↔ Art N V Art N
S ↔ the N V Art N
S ↔ the dog V Art N
S ↔ the dog bites Art N
S ↔ the dog bites the N
S ↔ the dog bites the man
Parse the sentence : the dog bites the man using bottom
up parsing.
S ↔ the dog bites the man
S ↔ the dog bites the N
S ↔ the dog bites Art N
S ↔ the dog V Art N
S ↔ the N V Art N
S ↔ Art N V Art N
S ↔ Art N V NP
S ↔Art N VP
S ↔NP VP
Natural Language Applications