RECIPROCAL AL C COLLISION AVOIDAN ANCE AN AND N NAVIGATION F FOR VIDEO G GAM AMES Jamie Snape 1 Stephen J. Guy 1 Jur van den Berg 2 Ming C. Lin Di Dine nesh M h Mano nocha ha 1 1 University of North Carolina at Chapel Hill 2 University of Utah
Out Outline line • Introduction • Hybrid Reciprocal Velocity Obstacles (HRVO) • Goal Velocity Obstacles (GVO) • Optimal Reciprocal Collision Avoidance (ORCA) • Comparison • Conclusion Reciprocal Collision Avoidance and 2 Navigation for Video Games
INT INTRODUC ODUCTION ION Reciprocal Collision Avoidance and 3 Navigation for Video Games
Int Introduct oduction ion • Techniques for multi-agent navigation from robotics and cybernetics are increasingly applicable to AI in video games • Multicore architectures in current-generation computers and consoles allow increasing numbers of characters to be simulated Introduction 4
Hitman: Ab Absolution ( (1,200 A Agents) Square Enix / IO Interactive / UBM TechWeb, 2012 Reyno ynold ld’s ’s S Steering ng M Metho hod [ [1999] a and nd 3 3 mo mont nths hs o of ma manu nual t l tweaki king ng 5
Global P Path P h Planners CENTRAL ALIZED DECOUPLED DECOUPLED • Treat system of multiple • Compute paths for each agents as a single agent separately and then combined agent and use adjust speed along path to single-agent planner avoid collisions • e.g. Brooks & Lozano- • e.g. Kant & Zucker, 1986 Perez, 1983 (cell (decoupled) decompositions), Khatib, 1986 (potential fields), Canny, 1988 (roadmaps) Introduction 6
Local C Collision A Avoidance FORCE / P / POTENTIAL AL F FIELD VELOCITY S SPACE • Model agents as particle • Use current velocity of systems, each particle each agent to extrapolate applies a force on nearby its position for some short particles to maintain time interval separation • e.g. Fiorini & Shiller, 1998 • e.g. Reynolds, 1987 (velocity obstacles) (steering behaviors) • Social Forces (Helbing et al.) Introduction 7
Multi-Agent N Navigation: G Global + + L Local Snape, 2012 Hybrid Reciprocal Velocity Obstacles 8 (HRVO)
Collisions a and O Oscillations CO COLLISI SIONS NS OSCILLA OS ILLATIONS IONS • Pairs of agents touch or • Direction of successive intersect velocities alternates between left and right of agent • Implausible for video game characters • Causes noticeable artifacts in video games Introduction 9
HYBRID R RECIPROCAL AL V VELOCITY OBSTACLES ( (HRVO) Reciprocal Collision Avoidance and 10 Navigation for Video Games
Int Introduct oduction ion • Can we navigate multiple agents to goal points in 2D with no oscillations? Hybrid Reciprocal Velocity Obstacles 11 (HRVO)
Forbidden R Regions f for C Collision A Avoidance Velocity-based R Reasoning • Maritime navigation : “course indicator” (Battenberg, 1902) • Missile guidance (Guelman, 1976) • Artificial intelligence : “maneuvering board” (Tychonievich et al., 1989) • Robotics : “velocity obstacle” (Fiorini & Shiller, 1993, 1998) • Cybernetics : “collision cone” (Chakravarthy & Ghose, 1998) Hybrid Reciprocal Velocity Obstacles 12 (HRVO)
Velocity O Obstacles ( (VO) – – Fiorini Fiorini & & Shi hiller, 1 1998 WO WORKSPACE VELOCITY S SPACE Hybrid Reciprocal Velocity Obstacles 13 (HRVO)
Truncated ( (Reciprocal) V Velocity Obs Obstacle acles – G Guy e et a al., 2 2009 WO WORKSPACE VELOCITY S SPACE Hybrid Reciprocal Velocity Obstacles 14 (HRVO)
Os Oscillat cillations ions • Oscillations may occur since agents are decision-making entities • Each selects a velocity outside the VO of the other, but then old velocities are valid with respect to new VO • Agents will oscillate between these velocities Hybrid Reciprocal Velocity Obstacles 15 (HRVO)
Reciprocal V Velocity O Obstacles ( (RVO) - V Van d den B Berg e et a al., 2 2008 • Set of all velocities in VO averaged with current velocity of agent • One agent takes half responsibility for avoiding collision and other agent takes other half • Collision-free if each agent selects velocity outside RVO of other Hybrid Reciprocal Velocity Obstacles 16 (HRVO)
Reciprocal D Dances • Reciprocal dance oscillations may occur when agents do not select free velocity closest to current velocity • May be due to desire to choose velocity towards its goal point or due to the presence of a third agent Hybrid Reciprocal Velocity Obstacles 17 (HRVO)
Hybrid R Reciprocal V Velocity O Obstacles (HR (HRVO) ) – S Snape e et a al., 2 2009, 2 2011 • Enlarge RVO on the side we do not wish the agent to pass • Replace RVO edge on that side with VO edge Hybrid Reciprocal Velocity Obstacles 18 (HRVO)
No O Oscillations o or R Reciprocal D Dances • If A attempts pass on wrong side of B, must give full priority to B, as with VO • If A chooses correct side, may assume cooperation of B and retain equal priority, as with RVO • Reduces reciprocal dance oscillations without over- constraining motion Hybrid Reciprocal Velocity Obstacles 19 (HRVO)
Circle S Scenario ( (75 A Agents) Snape, 2012 Hybrid Reciprocal Velocity Obstacles 20 (HRVO)
Multi-Agent N Navigation Hybrid Reciprocal Velocity Obstacles 21 (HRVO)
Game L Loop Hybrid Reciprocal Velocity Obstacles 22 (HRVO)
Game L Loop Hybrid Reciprocal Velocity Obstacles 23 (HRVO)
Game L Loop Hybrid Reciprocal Velocity Obstacles 24 (HRVO)
Union o of H Hybrid R Reciprocal V Velocity Obs Obstacle acles Hybrid Reciprocal Velocity Obstacles 25 (HRVO)
New V Velocity O Optimization – G Guy e et a al., 2 2009 Hybrid Reciprocal Velocity Obstacles 26 (HRVO)
Experimental R Results Hybrid Reciprocal Velocity Obstacles 27 (HRVO)
Im Imple plement ntat ation ion • HRVO Library (C++) • http://gamma.cs.unc.edu/HRVO/ • 1,500 downloads since October 2009 Hybrid Reciprocal Velocity Obstacles 28 (HRVO)
Rectangle S Scenario ( (4 A Agents) Hybrid Reciprocal Velocity Obstacles 29 (HRVO)
Circle S Scenario ( (75 A Agents) Snape, 2012 Hybrid Reciprocal Velocity Obstacles 30 (HRVO)
Su Summa mmary y • HRVO for agents in 2D • Motion of agents is free of oscillations and reciprocal dances in practice • Each agent acts independently and does not explicitly communicate with other agents Hybrid Reciprocal Velocity Obstacles 31 (HRVO)
GOAL AL V VELOCITY O OBSTACLES ( (GVO) Reciprocal Collision Avoidance and 32 Navigation for Video Games
Int Introduct oduction ion • HRVO or RVO navigates multiple agents to static goal points with no oscillations in practice • Can we accommodate goal regions, e.g. line segment or area goals, and moving goals? Goal Velocity Obstacles (GVO) 33
Wa Wayportals: L Line G Goals O Optimization [Curtis et al. 2012] University of North Carolina at Chapel Hill 34
Wa Wayportals: L Line G Goals O Optimization Dungeon – 97 agents [Mononen 2009] [Curtis et al. 2012] University of North Carolina at Chapel Hill 35
Preferred V Velocity POINT G GOAL AL MOVING G GOAL AL Goal Velocity Obstacles (GVO) 36
Goal V Velocity O Obstacles ( (GVO) – [ [Sn Snape e et a al., 2 2012] • Use VO not only to avoid collisions, but also to direct agent to a goal region • Choose velocities inside GVO to cause a “collision” with the goal region • Optimize on closest velocity to current velocity inside GVO rather than preferred velocity Goal Velocity Obstacles (GVO) 37
Line G Goal WO WORKSPACE VELOCITY S SPACE Goal Velocity Obstacles (GVO) 38
Moving G Goal WO WORKSPACE VELOCITY S SPACE Goal Velocity Obstacles (GVO) 39
Experimental R Results Goal Velocity Obstacles (GVO) 40
Line G Goal S Scenario ( (25 A Agents) Snape, 2012 Goal Velocity Obstacles (GVO) 41
Moving G Goal S Scenario ( (25 A Agents) Snape, 2012 Goal Velocity Obstacles (GVO) 42
Su Summa mmary y • GVO for specifying goal regions using VO • Choose velocities inside GVO to eventually “collide” with the goal • Goals may be regions with nonzero area and may be moving Goal Velocity Obstacles (GVO) 43
OPTIMAL AL R RECIPROCAL AL C COLLISION AVOIDAN ANCE Reciprocal Collision Avoidance and 44 Navigation for Video Games
Int Introduct oduction ion • HRVO eliminates almost all oscillations in practice, but makes no theoretical guarantees of smoothness • Can we guarantee trajectories in velocity space are continuous, so that trajectories of agents in workspace are continuously differentiable, i.e. smooth? Optimal Reciprocal Collision Avoidance 45 (ORCA)
Optimal R Reciprocal C Collision Avoidance ( (ORCA) A) – V Van d den B Berg e et a al., 2 2011 • Augment VO with an additional linear ORCA constraint • Provides a half-plane of velocities that are locally free of collisions, oscillations, and reciprocal dances • Choose a velocity from the intersection of all ORCA constraints of other agents Optimal Reciprocal Collision Avoidance 46 (ORCA)
Recommend
More recommend