Logistics Checkpoint 1 -- Framework Defining your problem Due - - PDF document

logistics
SMART_READER_LITE
LIVE PREVIEW

Logistics Checkpoint 1 -- Framework Defining your problem Due - - PDF document

Logistics Checkpoint 1 -- Framework Defining your problem Due Friday, Dec 22nd. Group accounts Need one for you project? Let me know. Need a partner? Check the Web page! More matchmaking in 2nd half Logistics


slide-1
SLIDE 1

1

Defining your problem

Logistics

 Checkpoint 1 -- Framework

 Due Friday, Dec 22nd.  Group accounts…

 Need one for you project? Let me know.

 Need a partner? Check the Web page!

 More matchmaking in 2nd half

Logistics

 Grad Report

 Will need topics first week after we return

from break (Jan 11th).

Plan for today

 Definining your problem.

 EAs as a mechanism for search  Checkpoint 2

 Questions before we start

Evolutionary Algorithms

 An EA uses some mechanisms inspired by biological

evolution: reproduction, mutation, recombination, natural selection and survival of the fittest.

 Candidate solutions to the optimization problem play

the role of individuals in a population, and the cost function determines the environment within which the solutions "live".

 Evolution of the population then takes place after the

repeated application of the above operators.

Evolutionary Computation process

Initialize population Select individuals for crossover (based on fitness function Crossover Mutation Insert new offspring into population Are stopping criteria satisfied? Finish

slide-2
SLIDE 2

2

Evolutionary Algorithms

 To use evolutionary algorithms your must:

 Define your problem  Define your genotype  Identify your phenotype  Define the genotype -> phenotype translation  Define crossover and mutation operators  Define fitness  Determine selection criteria  Set population parameters

The Problem

Problem

parameters solution

  • utput

The Problem

 Parameters

 values that define a particular instance of the

problem

 Solution

 This is the realization of the individual (phenotype)

The solution has a number of traits/variables

 Output

 This is the result of applying the solution to the

  • problem. The output will get judged for fitness.

Fitness

Individual

Phenotype Genotype

problem

parameters

  • utput

Fitness

fitness

Population

individuals

Phenotype

 Phenotype defines the set of

attributes/traits/variables that define the a problem.

 Ultimately, one is looking for the best values for

each variable/trait.

 A particular instance of a phenotype

(individual) will represent a single solution to the problem.

slide-3
SLIDE 3

3

Phenotype

 The set of all instances comprise all

solutions (or the search space)

 Any generation represents a subset of

the search space.

Optimization Problems

 Given:

 a function f : A → R from some set A to

the real numbers

 Sought:

 an element x0 in A such that f(x0) ≤ f(x) for

all x in A ("minimization") or such that f(x0) ≥ f(x) for all x in A ("maximization").

EAs as optimization

 Let phenotype = a set of variables

 P = <V1, …, Vn>

 Fitness:

 f: P → R

 We are looking for:

 an element x0 in P such that f(x0) ≥ f(x) for

all x in P ("maximization").

Search and Optimization Methods [Goldberg]

 Calculus-based

 Uses the gradient

 Enumerative

 Looks at every point in the space

 Random

 Random walks through the search space

Search and Optimization Methods [Goldberg]

 Calculus / Gradient based

 Indirect - solve system of equations

created by setting gradient to 0

 Direct (hillclimbing) - follow the function

based on neighbor that results in the highest gradient.

 Potential to get stuck at local min/max.

Search and Optimization Methods [Goldberg]

 Enumerative

 Dynamic Programming  CS4 Project

 For a large search space, just not

efficient!

slide-4
SLIDE 4

4

Search and Optimization Methods [Goldberg]

 Random

 Random jumps through the search space  Simulated Annealing

 Simulates the physical process of annealing  material is heated and then cooled (as steel or

glass) usually for softening and making the material less brittle.

 EAs/GAs/

Kangaroo analogy (from comp.ai.neural-nets)

 Kangaroo looking for Mt. Everest:

 Hillclimbing:

 “The kangaroo can hope at best to find the top

  • f a mountain close to where he starts.

There’s no guarantee that the mountain will be Everest or even a very high mountain”.

Kangaroo analogy (from comp.ai.neural-nets)

 Kangaroo looking for Mt. Everest:

 Simulated annealing:

 “The kangaroo is drunk and hops around

randomly for a long time. However, he gradually sobers up and tends to hop up a hill”

Kangaroo analogy (from comp.ai.neural-nets)

 Kangaroo looking for Mt. Everest:

 GAs:

 “Lots of kangaroos are parachuted into the

Himalayas at random places. The kangaroos do not know that they are supposed to be looking for Everest. However, every few years, you shoot the kangaroos at low altitudes and hope the ones that are left will be fruitful and multiply.

Questions so far? Problems suitable for GAs

 Large search space.  Large dimensional space  Fitness that has multiple local

minima/maxima.

slide-5
SLIDE 5

5

What makes EAs unique.

 Work with codings (genotype) of variable set,

not the variables themselves.

 Search from a population of points, not single

points.

 Uses payoff information (fitness fuinction),

not derivatives or other aux info

 Uses probabilistic transition rules, not

deterministic ones.

Problem areas using EAs

 Optimization

 Numerical  Combinatorics  Circuit layout  Photo album layout  Job shop scheduling

Problem areas using EAs

 Automatic programming

 Generation of programs to solve a given task  Genetic programming

 Machine learning

 Classification  Prediction (weather / protein structure)  Learning  Weights for neural nets

Problem areas using EAs

 Economics

 Bidding stategies  Prediction  Emergence of economic markets

 Immune Systems

 Somatic mutation  Drug design  genetics

Problem areas using EAs

 Ecology

 Biological arms race  Host-parasite coevolution  Resource management (World Peace!)

 Genetics

 Evolution simulation

Problems areas using EAs

 Social Systems

 Evolution of social behavior (Sims)  Cooperation and Collaboration

 Creative Arts

 Music  Graphics  Animation.

slide-6
SLIDE 6

6

Possible problems proposed by students in this class

 Traditional NP-Complete problems:

 Hamiltonian Cycle  Knapsack

 Resource Allocation:

 World Peace (really!)

 Artificial Intelligence

 GAs and Neural Nets  Natural Language processing

 Genetics

 DNA sequencing/profiling?  Protein structure prediction

Possible problems proposed by people in this class

 Finance

 mutual fund prediction

 Control systems

 airplane landing

 Games

 Checkers/Chess (using neural nets)

 Image Processing

 Feature detection

Possible problems proposed by people in this class

 Animation

 Character Animation  Game AI  Fire algorithms

 Audio Processing

 Wave terrain synthesis

The Problem

Problem

parameters solution

  • utput

Defining your problem

 Instance

 What is your problem are  what are the parameters  On what will you be applying your solution

Defining your problem.

 Solution:

 What are the traits/variables that

collectively define an individual solution.

 What are valid values for each of these

traits.

 How many traits/how many possible

values?

 This is your phenotype!!!  This defines your solution space.

slide-7
SLIDE 7

7

Defining your problem

 Output:

 On what value or output will your solution

be judged.

 What is the manifestation of a given

individual solution.

Traveling Salesman Problem

 Instance:

 N cities with distances between pairs of

cities

 Said another way:

 Complete graph with n vertices such that all

edges are labeled with a cost value

Traveling Salesman Problem

 Solution:

 Tour of the cities such that each city is

visited once.

 Said another way:

 A permutation of the cities.

 Is this a large search space?

 n cities = n! permutation

Traveling Salesman Problem

 Output:

 Distance traveled to complete the tour.

 Questions?

Break In the 2nd half

 Look at more applications solved using

EAs and describe the problem

slide-8
SLIDE 8

8

Function optimization

 Optimization of a function of n

variables.

 This is checkpoint #1.

 Instance:

 Function to be optimized.  Range of variables

Function optimization

 Solution:

 N variables

 Output:

 The value of the function when evaluated.

 Is this a difficult problem?

 If n is large enough.

Transportation Problem

 [Michalewicz -- chapter 9]  Resource allocation problem

 Given

 n sources -- each with a particular supply of goods  m destinations -- each with a given demand of goods  Cost function -- which indicates the cost of shipping from

source i to destination j

 Problem:

 Find the amount to ship from each source to each

destination to fullfil need and minimize shipping cost.

Transportation Problem

 Instance:

 n sources (attached with supply)  m destinations (attached with demand)  cost to ship from each source to each

destination.

Transportation Problem

 Instance: http://www.me.utexas.edu/~jensen/models/network/net8.html

Transportation problem

 Solution:

 For each source, the amount of goods to

send to each destination.

slide-9
SLIDE 9

9

Transportation Problem

 Constraints:

 Each source cannot give more than it has  East destination cannot receive more than

it needs.

 All demand must be met

 Constrainst can be dealt with by

individual, fitness, reproduction.

Transportation problem

 Output:

 Cost of shipping from all sources to all

destinations.

Economic Prediction

 Problem:

 Given a set of historical financial data, can

you develop a function/program that will fit the data and serve as a means to predict future trends.

 Sam Lallemand, RIT Grad student

Economic Prediction

 Instance:

 Set of financial data (captured over a

period of time):

 7 financial indicators  Canada / US dollar exchange rate.

Economic Prediction

 Solution:

 A “program” that takes 7 arguments

(financial indicators) and predicts Canada/US dollar exchange rate.

 Hmm…genetic programming. More on this

after break.

Economic Prediction

 Output:

 Measure of difference from actual data.

 More on the details in early February.

slide-10
SLIDE 10

10

N Queens Problem

 Problem:

 Can you place n

chess queens on an n×n chessboard such that none of them is able to capture any other using the standard chess queen's moves.

N Queens Problem

 Instance:

 n x n chess board

 Solution:

 Location of n queens

 Output:

 Number of queens that can be captured.

Procedural Textures

 Using Genetic Algorithms

Sims 1992 Musgrave 1993

Texture Generation

 Problem:

 Create aesthetically pleasing textures

 Instance:

 2D array of pixels

 Solution:

 R,G,B color triplet for each pixel

 Output:

 The resultant image.

Exam Scheduling

 Problem:

 Assign a number of exams into a number

  • f slots satisfying a group of constraints

 Specific instance of the Timetable

problem

 NP-Complete

 See [Burke, Newall, 1999]

Exam Scheduling

 Instance:

 List of available slots  List of exams to scheduled.  List of students and the exams they need

to take.

 Constriants

slide-11
SLIDE 11

11

Exam Scheduling

 Constraints:

 Student can’t be in two places at one time.  Instructor can’t be in two places at one

time.

 One exam per classroom at any given time.  Avoid back-to-back exams for a student.

Exam Scheduling

 Solution:

 Assignment of exams to classrooms

 Output:

 Number of student or instructor conflicts.

(minimize this).

Animation

 Motion of “evolved creature” (Sims 1994)  Problem: get creature to “swim” from point A

to point B

Animation

 Instance:

 Articulated figure with n joints  Time varying force field  Goal: get from point A to point B

Animation

 Solution:

 For each time step:

 An assignment for joint angles to apply to each

joint.

 This can be quite a large search space

especially if # of time steps is large.

Animation

 Output:

 Amount of “time” for creature to reach

goal.

slide-12
SLIDE 12

12

Examples

 Seen enough?  Let’s move on to Checkpoint 2