Path-Finding with Motion Constraints Amongst Obstacles in Real Time Strategies

Post on 05-Jan-2016

35 views 1 download

Tags:

description

Path-Finding with Motion Constraints Amongst Obstacles in Real Time Strategies. By Jeremiah J. Shepherd Committee: Jijun Tang Roger Dougal Jason O’Kane. Introduction. Most video games have some form of path-finding Methods for finding paths are primitive - PowerPoint PPT Presentation

Transcript of Path-Finding with Motion Constraints Amongst Obstacles in Real Time Strategies

Path-Finding with Motion Constraints Amongst Obstacles

in Real Time StrategiesBy Jeremiah J. Shepherd

Committee:Jijun Tang

Roger DougalJason O’Kane

Introduction

• Most video games have some form of path-finding

• Methods for finding paths are primitive– Motion Constraints not easily implemented– Agent movement is not realistic

• Some games fabricate path realism

Introduction

• Real Time Strategies (RTS) are notorious for simple path-finding

• “In an RTS, as in other wargames, the participants position and maneuver units (agents) and structures under their control to secure areas of the map and/or destroy their opponents' assets.” (Gervk)

Introduction

• Path-finding in RTS’s generally involves these steps:– A unit and destination for the unit is selected– An obstacle free path is the calculated by

using an algorithm like A*– The path is followed by a “move-rotate-move”

method

Introduction

• These paths can be created in this fashion because of the structure of the environment

• The environment is generally a grid– The size an number of cells are known– Obstacles exist in the environment and are

known– Each grid cell has an occupancy flag

Introduction

Old Game Path-finding Example

• Command and Conquer

New game path-finding example

• Halo Wars

Introduction

• A problem emerges when adding motion constraints to these paths– Paths found may not reach the destination– Paths are no longer guaranteed to be

obstacle free

Introduction

Introduction

• The method I propose uses an algorithm found in motion planning and path-finding for robotics

• Combines plans and paths found with the algorithm with carefully crafted data structures

• Paths with motion constraints could be calculated in real-time

Related Work

• Rapidly Exploring Random Trees (RRT) is an algorithm that can find a path and a motion plan that adheres to motion constraints

Related Work

• Goal biased RRT’s work by:1. Choose the point nearest to the goal state in the

tree and attempt to connect the two2. If it succeeds in connecting then a path and a plan

is found3. Else choose a random point in the configuration

space 1. Find the point in the tree nearest to the random point2. Choose actions that will incrementally move toward the

new point, creating new points in the tree

4. Repeat until goal is reached or it is determined that the goal is unreachable

Related Work

Related Work

• Why not use RRT’s?– They are inconsistent in regards to speed– In previous tests, the range of time it took to

find a path and motion plan was from six seconds to two minutes

Related Work

• Previous Attempts (Trail of Tears)– Tube Guided RRT– Preprocessing with Motion Planning Matrix

and Environment Matrix (MPM&EM)

Related Work

• Tube Guided RRT– Use a tube to constrict sampling– The less samples the faster it will find a path

• Algorithm– Draw a Probablistic Road Map (PRM)– Find the shortest path on the PRM– Construct a tube with the width the size of the

turning radius around the path– Run the RRT, only sampling points in the tube

Related Work

Related Work

• Tube Guided RRT Problems– It ran on par with a regular RRT– Some cases it took much longer than a

regular RRT– More inconsistent than a regular RRT

Related Work

• MPM&EM– The broad idea is to piece together small

paths and motion plans to create a large motion plan and path

– There are two stages to this algorithm• Offline Stage• Online Stage

Related Work

• The Smallest Turning Radius Square (STRS) is important to both stages

• Contains a full turn to the left and right

Related Work

• Offline Stage– Create the environment matrix (EM)– Create an initial motion plan matrix (MPM)– Add references in the environment matrix (EM) and

the calculate the final (MPM)

• Online Stage– Traverse the EM from the starting state to the goal

state– Follow the motion plans stored in the MPM as

referenced by the information in the EM cells

Related Work

Related Work

Related Work

• Create an initial motion plan matrix (MPM)– 3D data structure based on the x, y and in

the configuration space– Contains potential motion plans that can be

used when the STRS is obstacle free – A special environment is used for this step

• All paths are contained inside of the STRS

Related Work

Related Work

The Algorithm – Offline Stage

Related Work

• Create the EM continued– For all the points in the EM and for all the

points in the STRS at that EM find and store a motion plan and path

– If a motion plan is collision free in the MPM then a reference to that plan is stored in the EM

– Else calculate a new motion plan store that in the MPM and store a reference to that in the EM

Related Work

Related Work

Related Work

• From the starting point calculate a path using A*– The points that lay on the outer edge of

the STRS are given higher priority

• Traverse the EM using the path

• Create a full motion plan with the references in the EM to the MPM

Related Work

Related Work

Related Work

• Problems with MPM&EM– Uses too much memory

– Paths can look very unnatural

New Algorithm

• Principles– Similar idea of piecing together smaller

paths

– FORGET RRT’s!

– Use Dubin’s curves to find paths

New Algorithm

• Dubins Car– It finds the shortest path for a

nonholonomic model in an obstacle free environment

– The car that only moves forward

– The car can only steer all the way right, all the way left, or not at all

– Paths and plans are very small

New Algorithm

• Dubins Car’s 6 motion primitives

New Algorithm

• Algorithm Overview– Create an album of motion-plans and

paths (AMAP)

– Create a collision set (CS) containing colliding edges

New Algorithm

• AMAP Construction– Create paths for all cells to the right of

the center STRS using Dubin’s Curves

– We can do this because the left side will mirror the right

– Cuts the memory consumption in half

Related Work

Related Work

New Algorithm

• CS Construction– For every cell in the environment check

to see if an edge collides

– If so add it to the CS

New Algorithm

• Online Portion– Use a slightly modified version of A* to

traverse AMAP

– Includes a short circuit

New Algorithm

New Algorithm

Results

0

20

40

60

80

100

120

0 20 40 60 80 100 120

Series1

Series2

Series3

Series4

Series5

Series6

Series7

Results

0

20

40

60

80

100

120

0 20 40 60 80 100 120

Series1

Series2

Series3

Series4

Series5

Series6

Series7

Series8

Series9

Series10

Series11

Series12

Conclusion

• It is consistently gooder

Questions?