ai architecture for racing vehicle control l.
Skip this Video
Loading SlideShow in 5 Seconds..
AI Architecture for Racing Vehicle Control PowerPoint Presentation
Download Presentation
AI Architecture for Racing Vehicle Control

Loading in 2 Seconds...

play fullscreen
1 / 42

AI Architecture for Racing Vehicle Control - PowerPoint PPT Presentation

  • Uploaded on

AI Architecture for Racing Vehicle Control November 3, 2004 Upmanyu Misra Scope 8.1: Racing Vehicle Control using Insect Intelligence 8.2: Fast and Efficient Approximation of Racing Lines Downforce by Smartdog Alex Darby Alex Darby

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'AI Architecture for Racing Vehicle Control' - ivanbritt

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ai architecture for racing vehicle control

AI Architecture for Racing Vehicle Control

November 3, 2004

Upmanyu Misra

  • 8.1: Racing Vehicle Control using Insect Intelligence
  • 8.2: Fast and Efficient Approximation of Racing Lines
  • Downforce by Smartdog
  • Alex Darby
alex darby
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.
  • Video game titles in which players take control of not-yet-invented vehicles
  • Different from NFS
  • Similar to Star Wars, anyone??
big deal eh
Big Deal, eh?
  • Deformable car models
  • Off-the-wall additions to the F-1 racing genre
    • Thrust blasters
    • Super-engines
    • Insane speeds and stunts
right intentions
Right Intentions
  • Intelligent
  • Behavior must be intentional
  • Intentions ≡ Intelligence

Agent’s view

Player’s view

simplify f 1 racing
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


Downforce Simulation

Data Representation

AI Framework

Track Spaces

Brooks’ Subsumption

Insect AI

The Four main layers of Downforce AI

Racing Lines



data abstraction
Data Abstraction
  • Need Data Abstraction and representation

- For Downforce, concept is “track space”

- Track space transforms 3-D position

to 2-D position

track space12
Track Space
  • Calculating <fWidthPos, fLengthPos> requires two vector normalizations per track position
  • Optimized by caching most common vectors
  • Unreliable for detecting fine-grain collisions
  • To avoid that …

we transform the whole bounding box of the car to 2-D

downforce ai
Downforce AI
  • Used Rodney Brooks’ Subsumption Architecture [Brooks91] and Insect AI architecture [Porcino03]
  • Downforce AI is primarily reactive
brooks subsumption architecture
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 don’t necessarily coordinate. But the result seems “Intelligent”
insect ai
Insect AI
  • Introduced by Nick Porcino
  • Ch. 6.2
  • It provides
    • Architecture
    • Notation
    • Design Methodology
as smart as a bug
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
  • 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
interaction between layers
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
output contention system
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
path following layer
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
  • 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

steering control
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)
wicked speed control
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
corner identification
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”)
approaching a corner
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
round the corner
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!)
tactical racing layer
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
optimum road positioning
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.
compound eye
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
collision avoidance speed control
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
fine grain avoidance layer
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
driving assist layer
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
  • By Clint Hannaford
  • Based on Reynolds’ work on Autonomous Character Locomotion
fixing racing lines
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
fixing racing lines39
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
  • Ignore the physics of vehicle movement
  • Concentrate on minimizing curvature
  • Start with mid-points on the track
  • AI Game Programming Wisdom 2
  • Rodney A. Brooks, “A Robust Layered Control System for a Mobile Robot”
  • Brian Beckman, “The Physics of Racing,”