H8xx - PowerPoint PPT Presentation

About This Presentation
Title:

H8xx

Description:

aaaaa – PowerPoint PPT presentation

Number of Views:82
Slides: 22
Provided by: dudelol
Category:
Tags:

less

Transcript and Presenter's Notes

Title: H8xx


1
CY3G2 Modern Heuristics
Lecture 8
  • Dr. Gillian Walker
  • Room 182
  • g.c.walker_at_reading.ac.uk

2
Problem of last week
  • There are four cities located on the vertices of
    a square.
  • Design a network of roads such that
  • Every city is connected with every other city.
  • The total length of road is minimised.

3
Solution
  • There are many possibilities which satisfy the
    problem
  • But each network has a different length.
  • The optimal solution isnt obvious and the proof
    of the optimal solution isnt obvious.

4
Solution
  • Optimal solution
  • This is known as Steiners problem and there is
    no known efficient algorithm for solving it.
  • However there are many engineering applications
    telephone networking, routing aircraft.

All angles 120
The total length of the network is 1 v3
5
Summary
  • We have spent the last two weeks studying
    evolutionary algorithms.
  • We have seen the advantages to using a population
    of solutions, where we use competition and
    ranking to promote or advance better solutions,
    allowing them to mate and compete for a place in
    new generations of solutions.
  • In this lecture we are going to look at how we
    can further develop evolutionary algorithms to
    deal with problem constraints.

6
Constraint satisfaction
  • Constraint satisfaction problems are problems
    that can be solved by satisfying constraints
  • Sudoku
  • The 8 queens problem
  • In the real world virtually all decision making
    involves constraints.
  • What distinguishes different types of problem,
    are the different types of constraints
  • Rules
  • Data dependencies
  • Algebraic expressions

7
Feasible and Infeasible
  • We have previously discussed two types of
    constraints
  • HARD constraints that must be satisfied in order
    to have a feasible solution
  • SOFT constraints we hope to accomplish but they
    dont render the solution infeasible.
  • From these definitions it becomes apparent that
    constraints divide our search space into
  • Areas which contain feasible solutions (satisfy
    all the constraints)
  • Areas which contain infeasible solutions
    (solutions which breech one, some or all the hard
    constraints)

8
Feasible vs Infeasible solutions
Search space
  • Solutions B, D and E are feasible.
  • Solutions A, C and F are infeasible.
  • In the context of our evolutionary algorithm how
    should we treat the infeasible solutions?

A
E
D
F
C
B
Feasible search space
Infeasible search space
9
How to deal with infeasible solutions?
  • Having feasible and infeasible solutions can
    affect how we design our evolutionary algorithm.
  • What if an infeasible solution scores better with
    our evaluation function than a feasible one?
  • We need an evaluation function to treat both
    feasible and infeasible solutions. This is hard.
  • In general a solution is to design two evaluation
    functions, evalf and evalu for the feasible and
    infeasible solutions respectively.

10
How to design the algorithm?
  • How are the functions evalf and evalu related?
    Should we assume that evalf ? evalu (the symbol ?
    is better than so is greater than for
    maximisation problems and smaller than for
    minimisation problems)
  • Should we kill off infeasible solutions all
    together? Death Penalty
  • Should we repair infeasible solutions by moving
    them to the closest point on the feasible space.
    (Replace them with the closest feasible solution)
  • If we repair infeasible solutions should we
    replace the infeasible solution in the population
    or should we only use the repair function for
    evaluations?

11
How to design the algorithm?
  • As we want to find a feasible solution should we
    penalise infeasible ones?
  • Should we change the topology of the search space
    by using decoders that might translate infeasible
    solutions into feasible ones?
  • How should we go about finding a feasible
    solution?
  • Recent trends concentrate on
  • Operators and decoders which impose a restriction
    that any feasible solution is better than any
    infeasible solution.
  • Multiobjective optimisation techniques.

12
Evalf vs Evalu
  • Which is better an infeasible solution that is
    almost the optimum or an unrealistic feasible
    function?
  • What is the shortest route from A to B?

Path 1
B
A
Path 2
13
Rejecting infeasible solutions
  • The death penalty heuristic is popular in
    evolutionary algorithms.
  • Kill off all the infeasible solutions at each
    step.
  • There is no need to separately evaluate feasible
    and infeasible solutions.
  • The death penalty heuristic works well when the
    feasible search space is convex and fills a
    regional proportion of the search space.
  • Otherwise the approach has problems
  • What if you randomly sampled the search space for
    your initial population and all solutions were
    infeasible?

14
Repairing infeasible solutions Pros
  • Repairing infeasible solutions is common in
    evolutionary computation, especially in
    combinatorial optimisation problems (TSP,
    knapsack problem)
  • In these cases it is easy to repair infeasible
    solutions to make them feasible.
  • The repaired version is used either
  • In evaluation
  • Replaces the infeasible solution in the
    population.
  • The process of repairing infeasible solutions is
    related to a combination of learning and
    evolution (Baldwin effect).
  • Learning in this case is as a result of a local
    search to find the nearest feasible solution. The
    improvement is translated to the individual.
  • A local search is equivalent to the learning
    during a single generation.

15
Repairing infeasible solutions Cons
  • The weakness of this approach lies in the problem
    dependence.
  • Different repair procedures have to be designed
    for each individual problem.
  • There is no standard heuristic, you could use
  • A greedy heuristic
  • A random approach.
  • In some cases repairing infeasible solutions
    becomes as complicated as solving the problem
    itself! (Often in nonlinear transporting
    problems, scheduling and timetabling.)

16
Replacing individuals by their repaired versions
  • Replacing infeasible solutions with their
    repaired counterpart relates to Lamarckian
    evolution.
  • Lamarckian assumed that a person improves during
    their lifetime and that these improvements are
    coded back into the genetics, and can be passed
    to the next generation.
  • The most common replacement strategy was reported
    by Orvosh and Davis and is known as the 5 rule.
    In combinatorial mathematics problems the best
    results were achieved when 5 of the repaired
    solutions replaced the original solutions.
  • In other algorithms (GENOCOP III) 15 was
    optimum. It is dependent on the problem.

17
Penalizing infeasible solutions
  • The most common way to deal with infeasible
    solutions is to penalize for their infeasibility,
    either by
  • Awarding a penalty for the infeasibility
  • Introducing a cost for repairing a solution.
  • The relationship between the infeasible solution
    and the feasible part of the search space plays a
    significant role in how the penalizing occurs.
  • An appropriate penalty function should consider
    the ease of repairing a function as well as the
    quality of the repaired version.

18
Decoders
  • Another reasonable heuristic for dealing with the
    issue of feasibility is to use specialized
    representations and variation operators to
    maintain the feasibility of the solutions in the
    population.
  • One possibility is a decoder where the solution
    encodes to an instruction about how to get to a
    solution, rather than being the solution.
  • Think of a knapsack problem which was interpreted
    as Take an item if possible. This would always
    lead to a feasible solution.
  • Each decoder imposes a relationship between a
    feasible solution and a decoded solution.

19
Decoders
  • It is important that several conditions are
    satisfied
  • For each solution there is an encoded solution.
  • For each encoded solution there is a feasible
    solution.
  • All solutions should be represented in the same
    number of encodings.
  • For NLP, Fourier transforms or wavelet transforms
    could be used.

20
Problem of the Week
  • There are five houses, each of a different colour
    and inhabited by women of different
    nationalities, with different pets, favourite
    drinks and cars. Moreover
  • The Englishwoman lives in the red house.
  • The Spaniard owns the dog.
  • The woman in the green house drinks cocoa.
  • The Ukrainian drinks eggnog.
  • The green house is immediately to the right of
    the ivory house.
  • The owner of the Toyota car also owns snails.
  • The owner of the Ford lives in the yellow house.

21
Problem of the week
  • The man in the middle house drinks milk.
  • The Norwegian lives in the first house on the
    left.
  • The woman who owns the Chevrolet lives in the
    house next to the house where the woman owns a
    fox.
  • The Ford owners house is next to the house where
    the horse is kept.
  • The Mercedes-Benz owner drinks orange juice.
  • The Japanese drives a Volkswagen.
  • The Norwegian lives next to the blue house.
  • The question is .... Who owns the zebra?
    Furthermore, who drinks water?
Write a Comment
User Comments (0)
About PowerShow.com