/
By Austin Borden, Qihan Long, and Jim Pratt By Austin Borden, Qihan Long, and Jim Pratt

By Austin Borden, Qihan Long, and Jim Pratt - PowerPoint Presentation

alida-meadow
alida-meadow . @alida-meadow
Follow
382 views
Uploaded On 2016-06-26

By Austin Borden, Qihan Long, and Jim Pratt - PPT Presentation

Racing Game AI Defining the Racetrack Sectors Define ontrack areas Interfaces Leading and trailing edges of a sector Interfaces Rightleft edge Driving line nodes Racing line Overtaking line ID: 378697

route racing speed steering racing route steering speed time position game car track road cars current line terrain layer path throttle http

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "By Austin Borden, Qihan Long, and Jim Pr..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

By Austin Borden, Qihan Long, and Jim Pratt

Racing Game

A.I.Slide2

Defining the Racetrack

Sectors

Define on-track areas

InterfacesLeading and trailing edges of a sectorSlide3

Interfaces

Right/left edge

Driving line nodes:

Racing lineOvertaking lineSlide4

Overtaking

When the

A.I.

car gets close to an opponent, it will change its driving line from racing to overtakingMultiple overtaking lines possible

Burnout

1:15Slide5

Sectors

Stores its distance from start, to finish line, and to other vehicles.

Path types

Terrain typesWallsHairpin turns

Brake-ThrottleSlide6

Path Types

Defines the type of route ahead

Normal

ShortcutLong route

Weapon pick-up route

Winding road

Drag strip

A.I. chooses route depending on current situationSlide7

Terrain Types

Adds another variable for

A.I.

to deal withRugged terrainSlick

If a route is a shortcut and also rugged, only vehicles capable of traversing will choose this route

Terrain TraversingSlide8

Racetrack Definition Conclusion

The more information we provide, the less complex the

A.I.

system has to beSlide9

Racing A.I.

Logic

Vehicles do not follow driving lines exactly, only guided by them

A.I. is supposed to emulate human input

Done by creating an

A.I.

controllerSlide10

Basic A.I.

Framework

Finite State Machines

Allows decision makingFixed Time-Step

Ensures that AI reacts quickly always

Controls

float

dx

; //-1.0 to 1.0 for left to right steeringfloat dy; //-1.0 to 1.0 for max brake to max accelerationSlide11

Looking Ahead

Cars look ahead for obstacles and turns

The faster it’s moving, the further it looks to smooth pathSlide12

Wall Avoidance

Position is predicted by using the current velocity and scaled by how far in the future we are predicting (seconds)

Correction amount is then applied to steering depending on which wall car is closest to

If predicted position is outside of sector, brakes are appliedSlide13

Hairpin Turns

Looking too far ahead during a sharp turn will cause A.I. to cut corners

To fix this, car looks for hairpin flags and shortens the look ahead distance if flags are foundSlide14

Under/Over-Steer

With simple physics cars can spin out due to over steering

Cars can also miss turns due to under steering

Based on sideways velocities of wheelsSlide15
Slide16

Steer Correction

Depending on over or under-steering, a correction value is added to the current steer value

Overcorrection is prevented by the

understeer/

oversteer

range

Colin McRae Dirt 2Slide17

Catch-Up Logic

If

A.I.

is winning…Limit A.I.’s

top speed in proportion to distance leading

Brake early for corners, accelerate slowly out of turns

Take long routes/ unstable terrain routes

Get worse weapons/ only target other A.I.

Opposite can be used if A.I. is trailingGood way of making a race challenging for all skill levelsDiddy Kong Racing 1:45

Shadows of the Empire 5:50Slide18

Catch Up Logic Case Study:

PureSlide19

The Rubber Band SystemSlide20

Racing Grouping in PureSlide21

Difficulty Regulation

Powerful

items

Intelligence modificationSimilar PlacingSlide22

Tuning the Car Handling

If each car has different characteristics, tuning the code can be time consuming.Slide23
Slide24

Adjusting the Parameters

Assign each parameter with a minimum and maximum value.

Modify the parameter depending on whether the lap time decreases or increases.

Time for this process can be reduced by running the game as fast as possible.Slide25

Real Time Editing

Real Time Track Modification

An important tool in AI creation is the ability the change the track in real time.

Allows problems in the track to be quickly modified and tested.

User Control Overriding AI

Allows tester to take control when AI becomes stuck or incapable of navigating a certain part of the track.

Can be used to test the AI on specific parts of the track.Slide26

Layer Behavior

Reactionary system

Modular approach makes it easy

Multiple inputs for one outputOutput contention system ultimately determines output

Layer Interactions:

Overriding

Internal states

Altering input for other layersSlide27

Example of LayersSlide28

Path Following Layer

Turning and speed dealt with separately

Attempt to keep car on line

Cornering regulation monitors speedCorners and apex determined

Formulate max speed and braking zone distance

Dynamic according to current speed

Braking, cruise, full throttleSlide29

Tactical Racing Layer

Makes competitive racing choices (driver into a racer)

Analyzes situation and races accordingly

Find optimum road positionGenerates new paths

Safe guards in placeSlide30

Visual Perception

8 eyes, 4 pairs

Determines speed and position of cars and environment

Determines desirability of current position based on environment and position of other carsSlide31

Fine Grain Avoidance Layer

Priority

Needed when cars want to occupy same space

Relative car position determines who yieldsPrevents collisions by overriding

For passing, steering is moderated

For linear, speed is moderatedSlide32

Determining Racing Lines

Problems with user made content

Track detail hard to take into account

Lines of minimum curvature are limiting, boringMidway points across track

Forces used to smooth out sharp turns

Safe guardsSlide33

Competitive AI Racing Under Open Street Conditions

Allows an AI controlled vehicle to traverse an random network of roads.

Finding the correct route to destination.

Calculating steering brake and throttle values.Slide34

Library Interface

RegisterRoute

Interface

Holds a list of intersections and roadsRegisters the path through the map

Called when entering a new route

DriveRoute

Interface

Used on a lower level than the RegisterRoute

interfaceCalculates steering, throttle, and brakesUsed for driving forward, backing up, colliding, and stopping.Slide35

Navigating the City

Find the current location

Update the road cache

When a road is fully traversed, loads a new road into the cache.

Emulate all possible routes

Finds possible routes

through the roadSlide36

Avoiding obstacles

Check for obstacles after the route is calculated.Slide37

References

Champandard

, Alex J. "Paris Game AI Conference '09: Highlights, Photos & Slides."

Game AI for Developers. Web. 24 Mar. 2010. <http://aigamedev.com/open/coverage/paris09-report/#session13>.

"

Gamasutra

- Features - The Pure Advantage: Advanced Racing Game AI."

Gamasutra

- The Art & Business of Making Games. Web. 24 Mar. 2010. <http://www.gamasutra.com/view/feature/3920/the_pure_advantage_advanced_.php>."Mario Kart Wii: Those Damn Powerups

." GamerBunny Speaks. Web. 24 Mar. 2010. <http://gamerbunny.wordpress.com/2008/05/19/mario-kart-wii-those-damn-powerups/>.Rabin, Steve. AI Game Programming Wisdom 2

. Hingham, MA: Charles River Media, 2004. Print.Rabin, Steve. AI Game Programming Wisdom. Hingham, Mass.: Charles River Media, 2007. Print.Youtube. Web. 24 Mar. 2010. <http://

youtube.com

>.Slide38

Questions?