Search and Machine Learning Kalyan Veeramachaneni, Jason Ansel, - - PowerPoint PPT Presentation

search and machine learning
SMART_READER_LITE
LIVE PREVIEW

Search and Machine Learning Kalyan Veeramachaneni, Jason Ansel, - - PowerPoint PPT Presentation

Search and Machine Learning Kalyan Veeramachaneni, Jason Ansel, Shoaib Kamil, Jeffrey Bosboom, Una-May OReilly, Saman Amarasinghe CGO Tutorial February 8th, 2015 Overview Parameter types and tuning An example tuning problem -


slide-1
SLIDE 1
  • Search and Machine Learning

CGO Tutorial February 8th, 2015 Kalyan Veeramachaneni, Jason Ansel, Shoaib Kamil, Jeffrey Bosboom, Una-May O’Reilly, Saman Amarasinghe

slide-2
SLIDE 2

Overview

  • Parameter types and tuning
  • An example tuning problem - permutation
  • A typical population based search process
  • Select-Create-Update process
  • Options
  • Create —> Operators
  • Select - Update
  • Composition of multiple search approaches
  • Steps to take for a new problem
  • Back to Mario example
slide-3
SLIDE 3

Parameter types

slide-4
SLIDE 4

Parameter types

Let’s pick permutation

Example: Permute the placement

  • f these computations
slide-5
SLIDE 5

A typical population based search process

Select Create Update Evaluate Initialize Evaluate

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4

. . . . . .

4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9

slide-6
SLIDE 6

Evaluate Initialize Select Create Update Evaluate

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9

A typical population based search process

slide-7
SLIDE 7

Evaluate Initialize Select Create Update Evaluate

1 1 4 1 2 2 6 2 3 3 8 3 4 0.97 0.84 0.73 0.52 4 5 4 5 5 2 5 6 9 6 6 7 7 1 7 8 8 3 8 9 1 2 3 4 5 6 7 8 9 9 7 4 6 8 5 2 9 1 3 7 9 1 2 3 3 4 0.32

. . . . . .

0.14 4 5 6 2 5 6 7 1 7 8 8 9 9

A typical population based search process

slide-8
SLIDE 8

Evaluate Initialize Select Create Update Evaluate

1 1 4 1 2 2 6 2 3 3 8 3 4 0.97 0.84 0.73 0.52 4 5 4 5 5 2 5 6 9 6 6 7 7 1 7 8 8 3 8 9 1 2 3 4 5 6 7 8 9 9 7 4 6 8 5 2 9 1 3 7 9 9 6 3 4 5 8 7 1 2 9 5 6 8 2 3 1 4 7 1 2 3 3 4 0.32

. . . . . .

0.14 4 5 6 2 5 6 7 1 7 8 8 9 9

A typical population based search process

slide-9
SLIDE 9

Evaluate Initialize Select Create Update Evaluate

9 6 3 4 5 8 7 1 2 9 5 6 8 2 3 1 4 7 1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 9 9 5 5 6 6 8 8 2 2 3 3 1 1 4 4 7 7

A typical population based search process

slide-10
SLIDE 10

Evaluate Initialize Update Evaluate Select Create

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9 1 1 2 2 3 3 4

. . . . . .

4 5 5 6 6 7 7 8 8 9 9 9 6 3 4 5 8 7 1 2 9 9 9 9 5 5 5 5 6 6 6 6 8 8 8 8 2 2 2 2 3 3 3 3 1 1 1 1 4 4 4 4 7 7 7 7

A typical population based search process

slide-11
SLIDE 11

Evaluate Initialize Update Evaluate Select Create

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9 1 1 2 2 3 3 4

. . . . . .

4 5 5 6 6 7 7 8 8 9 9 9 6 3 4 5 8 7 1 2 9 9 9 9 5 5 5 5 6 6 6 6 8 8 8 8 2 2 2 2 3 3 3 3 1 1 1 1 4 4 4 4 7 7 7 7 0.94 0.53 0.87 0.73 0.12

A typical population based search process

slide-12
SLIDE 12

Evaluate Initialize Update Evaluate Select Create

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 1 2 3 4 0.97 5 6 7 8 9 9 2 3

. . . . . .

0.14 4 5 6 1 7 8 9 9 9 7 9 1 1 2 2 3 3 4

. . . . . .

4 5 5 6 6 7 7 8 8 9 9 9 6 3 4 5 8 7 1 2 9 9 9 9 5 5 5 5 6 6 6 6 8 8 8 8 2 2 2 2 3 3 3 3 1 1 1 1 4 4 4 4 7 7 7 7 0.94 0.53 0.87 1 2 3 4 5 6 7 8 9 9 5 6 8 2 3 1 4 7 0.87 0.73 9 5 6 8 2 3 1 4 7 0.73 0.12

A typical population based search process

slide-13
SLIDE 13

Evaluate Initialize Update Evaluate Select Create

Continue

A typical population based search process

slide-14
SLIDE 14

Create —> Requires operators

  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

cross over points

slide-15
SLIDE 15
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

cross over points

_ _ │3 4 5│ _ _ _ _

Copy over a portion of good material from #1

Create —> Requires operators

slide-16
SLIDE 16
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

_ _ │3 4 5│ _ _ _ _

Create —> Requires operators

slide-17
SLIDE 17
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1 _ _ │3 4 5│ _ _ _ _

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

9

Create —> Requires operators

slide-18
SLIDE 18
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1 _ _ │3 4 5│ _ _ _ _

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6 9 6

Create —> Requires operators

slide-19
SLIDE 19
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1 _ _ │3 4 5│ _ _ _ _

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

9 6 8

Create —> Requires operators

slide-20
SLIDE 20
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1 _ _ │3 4 5│ _ _ _ _

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

9 6 8 7 1 2

Create —> Requires operators

slide-21
SLIDE 21
  • Operators take two or more parameters and create two or more new parameters
  • Let’s take the permutation example:
  • 1 2 3 4 5 6 7 8 9

8 5 7 1 2 4 9 3 6

Input

cross over points Copy over a portion of good material from #1

1 2 │ 3 4 5 │ 6 7 8 9 8 5 │ 7 1 2 │ 4 9 3 6

9 6 8 7 1 2

9 6 │3 4 5 │ 8 7 1 2

Create —> Requires operators

slide-22
SLIDE 22

Create:
 Several options exist for operators

  • For permutation parameter there are several
  • perators
  • Partially mapped crossover
  • Partition crossover
  • Ordered crossover
  • Edge crossover
  • Cycle crossover
slide-23
SLIDE 23

Select-update

  • Select —> chooses the solutions among the

population from which new solutions will be created

  • biasing the search towards to better solutions
  • Update—> updates the entire population towards

better search spaces

  • has stronger influence on convergence
slide-24
SLIDE 24

Particle Swarm Optimization (PSO) Select-update

  • State based—> for each member of the population,

a history is maintained

  • Select —> Individual based
  • for every individual select its previous best
  • select the best solution seen so far
  • Update—> only update individuals history if it finds

a better solution in the search space

slide-25
SLIDE 25

Genetic Algorithms Select-update

  • Select —> Tournament selection
  • select randomly k from n
  • among these k select the top 2
  • allows enough mixing

1 1 1 4 1 2 2 2 6 2 3 3 3 3 8 3 4 4 0.97 0.84 0.73 0.52 0.32

. . . . . .

0.14 4 4 5 4 5 5 5 2 5 6 6 2 5 6 9 6 6 7 7 7 1 1 7 7 8 8 8 8 3 8 9 9 9 9 7 9

n random k k=5 best 2

slide-26
SLIDE 26

Genetic Algorithms Select-update

  • Update—> multiple ways that allow us to control

exploration and exploitation

  • strong elitism
  • combine both old and new and select the top n
  • weak elitism
  • do it on a per individual basis, select if the new
  • ne it created is better than itself.
slide-27
SLIDE 27

Composition of multiple approaches

Ordered

Partial

Cycle

Partition

Edge

PSO

select-update

GA

select-update

DE

select-update

GA - Genetic algorithms PSO- Particle swarm optimization DE- Differential evolution

Operators

For permutation

Select-update choices

slide-28
SLIDE 28

Ordered

Partial

Cycle

Partition

Edge

PSO

select-update

GA

select-update

DE

select-update

GA - Genetic algorithms PSO- Particle swarm optimization DE- Differential evolution Ordered—PSO

Composition of multiple approaches

For permutation

Operators Select-update choices

slide-29
SLIDE 29

Ordered

Partial

Cycle

Partition

Edge

PSO

select-update

GA

select-update

DE

select-update

GA - Genetic algorithms PSO- Particle swarm optimization DE- Differential evolution Ordered—PSO Ordered—GA

Composition of multiple approaches

For permutation

Operators Select-update choices

slide-30
SLIDE 30

Ordered

Partial

Cycle

Partition

Edge

PSO

select-update

GA

select-update

DE

select-update

GA - Genetic algorithms PSO- Particle swarm optimization DE- Differential evolution Ordered—PSO Ordered—GA Partial—PSO

Composition of multiple approaches

For permutation

Operators Select-update choices

slide-31
SLIDE 31

Ordered

Partial

Cycle

Partition

Edge

PSO

select-update

GA

select-update

DE

select-update

GA - Genetic algorithms PSO- Particle swarm optimization DE- Differential evolution Ordered—PSO Ordered—GA Partial—PSO

Composition of multiple approaches

Partition—PSO Partition—GA Cycle—PSO

For permutation

Operators Select-update choices

slide-32
SLIDE 32

Parameter types

For each of these parameters we have operators, combined with techniques

slide-33
SLIDE 33

Steps when trying for a new problem ?

  • Design a representation
  • either uses an existing parameter
  • add new parameter
  • add operators that work on this new parameter
  • Choose the select-update/technique
slide-34
SLIDE 34

Back to Mario

  • Naive representation
  • 5 choices (left, right, jump, duck, run )
  • 12,000 frames
  • encode a bit string 60,000 bits long
  • first 5 are for decision making for the first frame

and second 5 are for second frame and so on

  • each bit represents whether or not a choice is

made at the frame

slide-35
SLIDE 35

Back to Mario

  • Duration representation
  • 1000 - EnumerationParameters for direction of movement (biased 3:1 to move to right)
  • Enumerated parameter options
  • L = left, R = right, B = run, N = none
  • Actual definition of options :
  • ["R", "L", "RB", "LB", "N", "LR", "LRB", "R2", "RB2", "R3", "RB3"]
  • 1000 - IntegerParameters for duration of each direction
  • Range:1-60 frames
  • 1000 - IntegerParameters for which frames to jump
  • Range 1-24000 frames
  • 1000 - IntegerParameters for duration of each jump
  • Range: 1-32 frames
  • Better because the number of dimensions of search is 4000
  • Decoupled jump