some interesting papers ukci '02: aniko ekart: gas for discrete sequence prediction given a...

25
Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3, ... ,2,0,3 what comes next? The idea: work out the probability that it is j, using statistics from all subsequences of length i ) ( j p i

Upload: raven-pickerel

Post on 15-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Some interesting papers

UKCI '02: Aniko Ekart:GAs for discrete sequence prediction

Given a long, long sequence of integers, eg1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3, ... ,2,0,3

what comes next?

The idea: work out the probability that it is j, using statistics from all subsequences of length i

)( jpi

Page 2: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Discrete sequence prediction

Then define

... use a GA to find the suitable weights.

This weird idea won the Binary Time Series contest at CEC '99

)()(1

jpwjpN

iii

Page 3: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Slime mold simulation

UKCI '02: Joe Rothermich and JFM:Studying the emergence of multicellularity with

Cartesian GP in ALife● Lots of simulated cells, each controlled by an

evolved controller● They can move influenced by chemical gradients● They can release chemicals● They can divide – a cell dies when it divides, and

produces two mutated children● They have energy, there are energy sources

Page 4: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Cartesian GP: repesentation

Each chromosome holds N nodes; a node describes a functionblock and is described by four integers:

1: the function

2: externalinput

3: link toa node

4: link toa node

0 = do nothing1 = move towards (2)2 = move away from (2)3 = if (2) present do (3), else (4)4 = if (2) present do (4), else (3)5 = if energy > UPPER do (3) else (4)6 = if energy < LOWER do (3) else (4)7 = do (3) then divide8 = do (3) then release chemical

The functions:

Page 5: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Cartesian GP for slime molds

Example:

0000 7100 1010 1012 3100 3024

If chemical 1 is presentthen do node 0 (= do nothing)else do node 0 (= do nothing)

0 1 2 3 4 5

Do nothing

Move towards chemical 0

Page 6: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Slime mold simulations

Some results:● Some nice groupings● Often: “divide only

when near energy source”

● Demo source in/home/shared/peter/software

in the archive filecells.tar.gz

Page 7: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Robot body plans: what's best?

SAB-7: Josh Bongard, Rolf Pfeifer:A method for isolating morphological effects on

evolved behaviour

Idea: 10 different body plans, each with 4 touch sensors, 4 angle sensors, eight one-degree-of-freedom motors.

Use a GA to configure a recurrent net: how far can the robot go in 500 time steps?

Page 8: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Robot body plans

Some bodies:

Vortex physics engine from www.cm-labs.com - commercialproduct - handles graphics, collisions, gravity, friction etc

Page 9: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

The neural net controller

Motors

Touchsensors

Anglesensors

Recurrent 3-nodehidden layer

Chromosome: 68 weights (including bias weights), each in -1 ... +1

Page 10: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Evolving NN-based controllers

● Population size 300, run for 200 generations● Strong elitism: copy the top 150 into new

generation, and then ...● ... use tournament selection of size 3 to choose

parents from these 150, to create another 76● ... and finally generate the last 74 by mutating

some of the bottom 150 of old population

Page 11: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Robot morphology tests

● 10 GA runs per body● Fitness = how far a chosen body part has moved

after 500 time-steps of the simulation

● Results:● Rhythmic gait readily emerges ... (hmm)● Too many or too few legs creates problems

Page 12: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Evolution of active vision

SAB-7: Davide Marocco and Dario Floreano:Active vision and feature selection in evolutionary behavioural systems

The ideas:● First: neural net controls size and motion of a

simple `retina' (3x3 grid) as it looks for a black square or triangle somewhere in a white box

● Second: NN controls pan-and-tilt camera on robot

● Third: same idea applied to a simulated car world

Page 13: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Simple active vision

● `Retina' = 3x3 grid of variable size

● Can also be moved by giving distance and direction

● Returns either average value of 9 cells, or value of top-left cell

● System outputs one of “triangle” or “square”

Page 14: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

The neural net used

1 2 3 4 5 6Outputs:1: it's a triangle2: it's a square3: average, or top-left4: retina size (as %)5: distance to move (as %)6: direction to move

BoundarybitRetina

The net outputs are fully recurrent, that is, each is connected to all the others

Page 15: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

The GA used

● Trained on 20 images, each with a triangle or square of random size in random position

● NN gets 50 time-steps – one time-step per move● Fitness = proportion of correct classifications

over the time-steps (NB: cannot say “don't know”, so never perfect)

● Typical evolved behaviour: move toward the shape and scale down, then oscillate vertically looking for a straight edge (if so, square, else..)

Page 16: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Applying it to a Koala robot

● Pan-tilt camera with 240x240 grayscale image● Infrared sensors on robot as well● NN controls robot, camera pan and tilt● Aim: the robot should travel as far as it can

without hitting anything● Evolved on the robot itself: each generation took

1.5 hours, needed around 12 generations in all

Page 17: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Applying it to steer a simulated car

● Car World: available as source, runs on Linux and Windows:carworld.sourceforge.net

● Artificial 3x3 retina evolved to track road edge

● Motion of retina controls vehicle steering

Page 18: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Ant colony: some analysis

GECCO-2002: Daniel Merkle, Martin Middendorf:Studies on the dynamics of ant colony optimisation algorithms

Idea: permutation problems: n cities, costs Cij >0 to go from i to j, find min-cost tour.

Analysed mathematically, results compared to simulations

Outcome: ACO behaviour depends in a complex way on the parameters of pheromone updating

Performance can even decline as ACO runs.

Page 19: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Container yard management

GECCO-02: Ping Chen, Zhaohui Fu, Andrew Lim:Using GAs to solve the yard allocation problem

● Port of Singapore: > 100,000 shiploads per year● Want to store containers: a single row may hold

containers from different shipments, and parts of a shipment may arrive/leave at various times

● Want to keep each shipment together, without needing to move containers to make space for other shipments

● An NP-hard problem...

Page 20: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Yard allocation: invalid example

● Picture shows one row, over times 1-16

● ...shows some invalid placements: must not have containers added to one end of a block and removed from the other end at the same time

Page 21: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Yard allocation: valid example

● A valid placement● Needs length 13 – is

this optimal?● Turn the problem into

a graph problem...

Page 22: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Yard allocation in graph form

means “is above”

Find a labelling of the graph such that Li < Lj iff i is above j

Page 23: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Yard allocation

● Given a labelling, it describes an ordering in which to “drop” the blocks from above – in effect, a game of Tetris!

● ... therefore, it's a permutation problem.● Fitness = max length of yard used (minimise)● GA uses one-point crossover with repair, PMX

and cycle crossovers; insertion, inversion and swap mutations

● Popsize 100; generate 200, take top 100.

Page 24: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

Yard allocation

● GA compared to simulated annealing, tabu search with short-term memory, tab-search with long-term memory

● Tested on problems with 117-236 separate shipments

● GA outperformed the other methods in all cases, by a healthy margin

● Problems online atwww.comp.nus.edu.sg/~fuzh/YAP/

Page 25: Some interesting papers UKCI '02: Aniko Ekart: GAs for discrete sequence prediction Given a long, long sequence of integers, eg 1,2,0,2,1,1,3,1,2,0,2,0,1,2,1,0,3,3,...,2,0,3

...and so...

Lots of unusual project possibilities...