Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge...

24
Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing

Transcript of Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge...

Page 1: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge

COBOSTAR Cognitive BodySpaces for Torcs based Adaptive

Racing

Page 2: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Outline:• TORCS Competition Setup

• COBOSTAR Design

• Parameter Optimization

• Strategy Modifications

Page 3: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

TORCS Competition Setup

Page 4: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

TORCS Competition Setup:

Only local information /

Main Idea

no complete track Information available

Page 5: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

TORCS Competition Setup:

Available Sensors

• Angle Sensor: current angle between the car direction and the track axis.

• Speed Sensors: speed in both axes.• 19 Range Sensors: free track space in front of

the car.• 36 opponent Sensors: notice opponents around

the car.• Additional Sensors: current engine speed,

current gear, rotation and speed for all wheels, damage of the car, etc.

Page 6: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

TORCS Competition Setup:

Car Control•Gas and Break Pedals•Gear shifting•Steering

Page 7: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

COBOSTAR Design

Page 8: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

COBOSTAR Design:

1 .On Track Strategy• Distance and direction of the longest range

sensor

2 .Off Track Strategy• Angle to track axis• Relative position to track center

Page 9: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

COBOSTAR Design:

On Track Strategy

Using:

Calculate: Target steering

angle:

Target speed:

Finally:

Page 10: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

COBOSTAR Design: on Track Strategy

:Gas or Break

How to Break :

How to Steer :

Page 11: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

COBOSTAR Design: off Track Strategy

what changes?

• Distance sensors to track borders are

unavailable.

• Steering becomes more difficult.

• Wheel slippage is much stronger.

Page 12: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Using:

Calculate:Target steering angle:

Target speed:

COBOSTAR Design: off Track Strategy

Page 13: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Stuck behavior:

COBOSTAR Design: off Track Strategy

Anti Slip Regulation:

If nothing else works,

Switch to reverse gear and stay in this mode until

angle to track axis is halved or until stuck again

Page 14: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization

Page 15: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization

CMA – Covariance Matrix AdaptationSmart(er) search for the best solution. Takes in

account the dependencies between the parameters

Evolution Process:• All parameters were optimized on various TORCS

tracks.• All sets of parameters were compared on all

tracks.• The most general parameter set was chosen.

Optimization Algorithm:

Page 16: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization – On Road

Fitness Function: 1( / distance raced + 1)

Page 17: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization – On Road

• The most general set, wins only in four of the tracks

(not that general).

• Second set with most wins, is only rated 6th – different

behavioral strategies suite for different track types.

• Best strategy for a track isn’t always the strategy that

was optimized on that track – local optimum.

• Differences between worst and best performance on

each track – hard to get a general strategy

Interesting findings

Page 18: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization – On Road

Blast from the past:

some strategies control this formula with P1 and some with P2.

Page 19: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Parameter Optimization – Off Road

• Not the same Fitness function. If the car controller is

good, then the car will not reach “off-road”

Why not the same as on-road?

• Crash Strategy: every 300 meters causes the

car to go off the road.

• Now the same fitness function can be used.

Solution

Page 20: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Strategy Modifications

Page 21: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Strategy Modifications – Gear Shifting

Shift up:

Shift down:

Each time the engine reaches 9500 RPM

Each time the engine drops bellow:

3300, 6200, 7000, 7300, 7700

For gears: 2, 3, 4, 5, 6 respectively

Page 22: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Strategy Modifications – Large Track

The problem:

Solution:

The target angle is interpolated between the

maximal distance sensor and its neighbors,

causing the to drive on slightly wavy trajectory.

Measuring the track width at the beginning of the race. If

it exceeded a hand-set threshold, some steering factors

were set by hand instead of the evolved ones.

Page 23: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

Strategy Modifications – 2nd Lap

Switching Strategies:

Analyze the general properties of the track and

switch to more suitable strategy.

Crash Point:

Remembering crash points from the first lap, in

the next lap the car would go into “passive

mode”.

Page 24: Optimized Sensory-motor Couplings plus Strategy Extensions for the TORCS Car Racing Challenge COBOSTAR Cognitive BodySpaces for Torcs based Adaptive Racing.

QUESTIONS?