AI Architecture for Racing Vehicle Control - PowerPoint PPT Presentation

About This Presentation
Title:

AI Architecture for Racing Vehicle Control

Description:

Each Behavior deals with a single aspect of the task(s) that the parent layer is ... On reaching max acceptable speed for the corner, cruise to apex ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 43
Provided by: upmany
Category:

less

Transcript and Presenter's Notes

Title: AI Architecture for Racing Vehicle Control


1
AI Architecture for Racing Vehicle Control
  • November 3, 2004
  • Upmanyu Misra

2
Scope
  • 8.1 Racing Vehicle Control using Insect
    Intelligence
  • 8.2 Fast and Efficient Approximation of Racing
    Lines
  • Downforce by Smartdog
  • Alex Darby

3
Alex Darby
  • Joint Honors in AI, Psychology and CS from Univ.
    of Nottingham
  • Was senior developer at Smartdog, that developed
    PS2 futuristic racing game Downforce
  • Now works with FreeStyle Games Ltd.

4
Futuristic?
  • Video game titles in which players take control
    of not-yet-invented vehicles
  • Different from NFS
  • Similar to Star Wars, anyone??

5
Big Deal, eh?
  • Deformable car models
  • Off-the-wall additions to the F-1 racing genre
  • Thrust blasters
  • Super-engines
  • Insane speeds and stunts

6
Right Intentions
  • Intelligent
  • Behavior must be intentional
  • Intentions Intelligence

Agents view
Players view
7
Simplify F-1 Racing
  • Speed is highest priority
  • Keep on track, preferably on optimal racing curve
  • Easy, yet realistic braking
  • Easy steering
  • Realistic throttle control

8
(No Transcript)
9
Overview
Downforce Simulation
MOVIE
AI Framework
Data Representation
Brooks Subsumption
Insect AI
Track Spaces
The Four main layers of Downforce AI
Racing Lines
DEMO
DEMO
10
Data Abstraction
  • Need Data Abstraction and representation
  • - For Downforce, concept is track space
  • - Track space transforms 3-D position
  • to 2-D position

11
Track Space
12
Track Space
  • Calculating ltfWidthPos, fLengthPosgt requires two
    vector normalizations per track position
  • Optimized by caching most common vectors

13
Disadvantage
  • Unreliable for detecting fine-grain collisions
  • To avoid that
  • we transform the whole bounding box of the car
    to 2-D

14
Downforce AI
  • Used Rodney Brooks Subsumption Architecture
    Brooks91 and Insect AI architecture Porcino03
  • Downforce AI is primarily reactive

15
Brooks Subsumption Architecture
  • Intelligent behavior can be generated without
    explicit representations or abstract reasoning of
    the kind that symbolic AI proposes
  • Intelligence is an emergent property of certain
    complex systems. Each layer does its job, they
    dont necessarily coordinate. But the result
    seems Intelligent

16
Brooks Subsumption Arch.
17
Insect AI
  • Introduced by Nick Porcino
  • Ch. 6.2
  • It provides
  • Architecture
  • Notation
  • Design Methodology

18
As smart as a Bug
  • Insects demonstrate a wide variety of interesting
    and successful behaviors
  • Seek (pursuit of a target)
  • Flee
  • Steer (away/into)
  • Yet, their nervous systems are simple
  • Hence its possible to analyze, compute and create
    simulation of their behaviors
  • This is called Computational Neuroethology

19
Downforce AI System Architecture
20
Behaviors
  • Each layer is composed of smaller sub-tasks
    called Behaviors
  • Each Behavior deals with a single aspect of the
    task(s) that the parent layer is responsible for
  • The overall behavior of the layer emerges from
    the interaction between constituent behaviors

21
Interaction between Layers
  • Three main ways of interactions
  • Directly override the output of another layer,
  • Directly affect the internal state of another
    layer,
  • One layer alters the input data of another layer
    to achieve its own task

22
Output Contention System
  • Based on three variables
  • Steering
  • Throttle
  • Braking
  • Every layer tries to manipulate them to achieve
    their goal
  • Contention system uses explicit priority system
    based on order of execution of layers and state
    dependent rules for situations that cannot be
    handled otherwise

23
Path Following Layer
  • Generates correct controller input for vehicle to
    follow a specific path at max speed
  • Consists of two independent behaviors
  • Steering control
  • Speed Control

24
Independent?!
  • Throughout the Downforce system it is assumed
    that other behaviors will fulfill their
    responsibilities
  • This facilitates emergent nature
  • reduced responsibilities
  • reduced problem space
  • reduced computational load per task
  • overall reduction in execution time

25
Steering Control
  • Calculates steering input that makes vehicle
    follow racing line
  • Needs to look ahead along the racing line from
    its current position to generate the value
  • Hence data needs to be represented accordingly
    (remember track space?)
  • Intelligent steering using PID controllers (Ch.
    2.8 pg 171, demo on CD)

26
Wicked Speed Control
  • Only responsible for regulating speed wrt path
  • Uses Newtonian physics equations for bodies in
    circular motion (remember centripetal/centrifugal
    forces?) to calculate max speed for any given
    track section
  • Uses FSM based around corners

27
Corner Identification
  • Start point from where the current speed
    becomes unfeasible
  • Apex first point after the start when the
    change in turn radius is opposite to that of the
    start of the corner (where the corner begins to
    open out)

28
Approaching a Corner
  • Calculate difference between the calculated max
    speed for the corner and the current speed
  • Derive the braking distance based on maximum
    braking (using good ol Newtonian eqns.)
  • If vehicle is outside the braking zone simply
    keep accelerating

29
Round the Corner
  • Once the braking zone is reached, apply maximum
    breaking
  • On reaching max acceptable speed for the corner,
    cruise to apex
  • By the time apex is reached, the system will be
    ready with another set of behaviors (hopefully!)

30
Tactical Racing Layer
  • Assesses the race conditions and changes the
    speed and racing line to gain racing advantage
  • Transforms an Expert Driver to an Expert Racer
  • Consists three behaviors
  • Optimum road position
  • New racing line
  • Collision avoidance speed control

31
Optimum Road Positioning
  • Visual perception
  • One pair of eyes facing in each direction
  • One eye responds to relative speed of other cars
  • Other responds to their proximity
  • Each eye stores a one-dimensional image that
    represents the entire track width and has a
    resolution of 20 perceptual pixels or
    percepcels.

32
Percepcels
33
Compound Eye
  • Products of the proximity and relative speed is
    stored in an array
  • Finally, we add the effect of the racing line to
    the compound eye with a high weightage
  • The tuning of the parameters takes time and
    experimentation. Makes it essential to have a
    method of editing parameters at run-time, ideally
    real-time Scripting

34
Collision Avoidance Speed Control
  • Overrides the speed control set by the PF layer
    to avoid collision, primarily front to back
  • Collision test is performed using velocities
    measured in the track space domain
  • Its further refined by calculating the relative
    fWidthPos component of the track space velocity
    wrt that of the racing line

35
Fine Grain Avoidance Layer
  • Deals with potential collision situations that
    were missed by previous layers
  • Consists of two behaviors
  • Race Priority/Racing Etiquette
  • Decides which car should back down
  • Fine Grain Collision Avoidance (they ran out of
    names!)
  • To avoid side-on collisions by restricting
    throttle and steering

36
Driving Assist Layer
  • Controls problems such as wheel spin and brake
    locks
  • Consists of two behaviors
  • Traction Control
  • Minimizes wheel spin/slide
  • The slip/spin of the wheel is normalized between
    their corresponding min and max
  • Modifies throttle speeds set by other layers
  • Anti-lock Braking
  • Same as traction control except that the brake
    value is scaled instead of the throttle

37
DEMO
  • http//www.atomicmedia.com/autonomous/
  • By Clint Hannaford
  • Based on Reynolds work on Autonomous Character
    Locomotion

38
Fixing Racing Lines
  • They are desirable
  • give AI vehicles a hint of realism
  • helps AI vehicles to present better challenge
  • Record path taken by an AI vehicle driven by a
    competent human player
  • fast and efficient
  • cannot be used for randomly generated or player
    created tracks

39
Fixing Racing Lines
  • Restrict random and player created tracks to
    being assembled from predefined segments with
    pre-computed racing lines
  • But
  • its not that much fun
  • racing line is context dependent and cannot be
    produced by plugging predefined sections

40
Approximating
  • Ignore the physics of vehicle movement
  • Concentrate on minimizing curvature
  • Start with mid-points on the track

41
Sources
  • AI Game Programming Wisdom 2
  • http//www.gamespot.com/ps2/driving/downforce/inde
    x.html
  • Rodney A. Brooks, A Robust Layered Control
    System for a Mobile Robot
  • Brian Beckman, The Physics of Racing,
    www.miata.net/sport/Physics/

42
THANKS
  • PHEW!!!
Write a Comment
User Comments (0)
About PowerShow.com