Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

Reactive and Potential Field Planners
Lecture 7: Potential Fields and Model Predictive Control
7.2. AI E NGINE AND S TEERING B EHAVIOUR I Design of an AI Engine and introduction to steering in game AI.
AI Pathfinding Representing the Search Space
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
CHAPTER 6 BASIC MANEUVERS.
Right and Left Turns.
NUS CS5247 Motion Planning for Camera Movements in Virtual Environments By Dennis Nieuwenhuisen and Mark H. Overmars In Proc. IEEE Int. Conf. on Robotics.
Steering Behaviors GAM 376 Robin Burke Winter 2008.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
CSE 380 – Computer Game Programming Pathfinding AI
Flocking References: xxx.
Artificial Intelligence in Game Design
Multiagent Probabilistic Smart Terrain Dr. John R. Sullins Youngstown State University.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Artificial Intelligence in Game Design Introduction to Learning.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Soldier of Fortune 2: Double Helix Paris York CIS 588.
Steering Behaviors For Autonomous Characters
DAMN : A Distributed Architecture for Mobile Navigation Julio K. Rosenblatt Presented By: Chris Miles.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
A Randomized Approach to Robot Path Planning Based on Lazy Evaluation Robert Bohlin, Lydia E. Kavraki (2001) Presented by: Robbie Paolini.
Artificial Intelligence in Game Design Camera Control.
Artificial Intelligence in Game Design Event and Sense Management.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
1 Constant Following Distance Simulations CS547 Final Project December 6, 1999 Jeremy Elson.
Raven Robin Burke GAM 376. Soccer standings Burke, 7 Ingebristen, 6 Buer, 6 Bukk, 6 Krishnaswamy, 4 Lobes, 3 Borys, 2 Rojas, 2 Bieneman, 2.
Artificial Intelligence in Game Design Problems and Goals.
06 - Boundary Models Overview Edge Tracking Active Contours Conclusion.
Introduction Tracking the corners Camera model and collision detection Keyframes Path Correction Controlling the entire path of a virtual camera In computer.
Behavior Based Robotics: A Wall Following Behavior Arun Mahendra - Dept. of Math, Physics & Engineering, Tarleton State University Mentor: Dr. Mircea Agapie.
Team Name: Domo Arigato Robot Name: Chipotle 1 Team Members: Jason DiSalvo Brian Eckerly Arun Rajmohan Neal Mehan Keun Young Jang.
Learning Game Maker Studio:
Artificial Intelligence in Game Design Behavior Trees.
lesson 3.3 STARTING, STOPPING, STEERING, AND TARGETING
Vectors and Direction In drawing a vector as an arrow you must choose a scale. If you walk five meters east, your displacement can be represented by a.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Artificial Intelligence in Game Design Lecture 6: Fuzzy Logic and Fuzzy State Machines.
Artificial Intelligence in Game Design
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Artificial Intelligence in Game Design Cooperative Movement.
Motion Planning in Games Mark Overmars Utrecht University.
Artificial Intelligence in Game Design N-Grams and Decision Tree Learning.
Artificial Intelligence in Game Design Dynamic Path Planning Algorithms.
Artificial Intelligence in Game Design
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Game Maker Terminology
Artificial Intelligence in Game Design
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Behavior Control of Virtual Vehicle
Artificial intelligence IN NPCs. Early Role Playing games Npcs in early role playing games were very limited in terms of being “Intelligent”. For instance,
REFERENCES: FLOCKING.
Artificial Intelligence in Game Design Influence Maps and Decision Making.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
CSCI 4310 Lecture 5: Steering Behaviors in Raven.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Background Shapes & Collision Resolution (Top-down and Side-scrolling)
Enemy and Friendly AIs Richard Gesick.
Review and Ideas for future Projects
Driving in City Traffic
Steering Behaviors GAM 376 Robin Burke Fall 2006.
CIS 488/588 Bruce R. Maxim UM-Dearborn
CO Games Concepts Week 12 Collision Detection
Presentation transcript:

Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors

Path Following Examples: –Move from one location to another along known route –Patrol area cyclically –Implementation of high-level path planning Go to door of bookstore Go down hall Go into PC room Path following moves character along these steps

Path Following Note that will never follow path perfectly –Like arrive, can’t ever reach an exact location –More realistic to move in smooth curves –More realistic if don’t follow exact path every time (patrolling) Desired path Actual path

Path Following Break desired path down into set of points along path Seek each point in sequence –When “close enough” to point, seek next point Possibly defined as slowRadius

Path Following Waypoints at important path points –Generated automatically or chosen manually by level designer –Most accurate to meet goal of path –Path planning algorithms used to create path from waypoints Desired path

Wall Avoidance Goal: keep character some avoidDistance from walls –Usually based on “bounding sphere” of object Most graphical objects represented this way avoidDistance

Wall Avoidance Project path of character to some lookahead away –lookahead > minimum distance required for stop at maxAccel when traveling at maxSpeed –Projection can use same algorithms that graphics use for ray casting If wall within lookahead, steer away lookahead

Wall Avoidance Determine collision point Project to point perpendicular to wall safeDistance away Seek that location avoidDistance Collision point Seek this point

Wall Avoidance May still collide with wall Algorithm will keep steering until parallel to wall New collision point Seek this new point

Wall Avoidance Corners can be problem if not detected by ray trace –Very common problem in robotics One solution: “whiskers” Project three lines from character No collision detected collision detected Steer away

Collision Avoidance Goal: avoid collisions with other characters who are also in motion –Is collision going to occur? –If so, how should we steer? Location of closest approach –Not where paths intersect

Collision Avoidance If distance less than some safeRadius at that point Flee that point If already in collision with object, just Flee its current location safeRadius Collision detected Flee where obstacle will be at that point safeRadius In collision Flee

Collision Avoidance Much more difficult if multiple obstacles –Determine time to collision of all –Flee from location of first collision –No perfect solution to problem No collisionFirst collision Later collision

Collision Avoidance Expensive to compute if many obstacles –C characters checking for collisions with each other  C 2 checks One solution: only check characters within some search radius

Jumping NPC jumping over obstacles key to many games –Run towards obstacle to achieve needed speed –Jump over obstacle –Land on other side Must be convincing –Speed, launch point must look realistic –Character should not jump unless can succeed (unless player interrupts) Going too slow for realistic jump Jump fails

Jumping Jump points –Target for “run up” by NPC –Usually have corresponding “landing pad” Large enough so covers all landing points from all of jump point –Created by level designer Ideally room designed so jump point looks “natural” Jump point Landing pad

Jumping “Starting radius” for run up based on maxSpeed, maxAccel –Outside radius  Seek jump point –Inside radius  Arrive point outside radius Seek jump point Jump point Landing pad

Combining Steering Behaviors What if multiple steering rules fire? –What should resulting steering be? –Blending results of rules –Prioritizing some rules over others $ $ $ $ $ Flee player Arrive gold Avoid wall

Blended Steering Behaviors Weighted sum of steering from different rules –Weights = relative importance of action –Can depend on “strength of stimulus (distance, etc.) Example: –Flee player with weight 0.5/distance from player –Arrive gold with weight 1/distance from gold –Steering = sum of these $ $ $ $ $

Blended Steering Behaviors Can result in “intelligent” path choices $ $ $ $ $

Blended Steering Behaviors Flocking –Seek “center of gravity” of flock –Align with average direction –Avoid direct collisions Center of gravity Avoid collision Average direction

Blended Steering Behaviors Blending conflicting behaviors can give results that meet no goals pursue Wall avoid result seek flee Stimuli perfectly balanced – no motion at all!

Prioritized Steering Behaviors Choose most important goal and execute its steering completely Often proximity based –Within safeRadius of wall  execute WallAvoid behavior –Within attackRadius of player  execute Seek behavior Pursue not considered Wall avoid has priority

Prioritized Steering Behaviors Can group similar behaviors –Give each unique priority Often based on “level of damage” to character if not handled –If total steering from high- priority group < threshold try next highest priority group Stimulus for high-priority behavior not strong enough to matter Avoid obstacles group Avoid walls to side Avoid wall on turns Avoid collisions group Avoid cars to side Avoid car in front Follow path group Seek next point on path around track

Prioritized Steering Behaviors Avoid obstacles group Avoid walls to side Avoid wall on turns Avoid collisions group Avoid cars to side Avoid car in front Follow path group Seek next point on path around track Next path point Steer away from wall has priority Ignore possible collisions with cars Ignore next point on path Steering

Prioritized Steering Behaviors Avoid obstacles group Avoid walls to side Avoid wall on turns Avoid collisions group Avoid cars to side Avoid car in front Follow path group Seek next point on path around track Avoid collision has priority Avoid obstacles steering below threshold Ignore next point on path Next path point Collision detected Minimal steering from walls Steering

Prioritized Steering Behaviors Avoid obstacles group Avoid walls to side Avoid wall on turns Avoid collisions group Avoid cars to side Avoid car in front Follow path group Seek next point on path around track Seek next path point has priority Avoid obstacles steering below threshold Avoid collisions steering below threshold Next path point Minimal steering from walls Steering Minimal steering from other cars

Prioritized Steering Behaviors Can still get stuck in cycles –Steer for one high-priority behavior Far enough away so no longer priority –Other behavior becomes priority Steers back toward first problem flee Flee enemies Seek target seek

Higher Level Control of Steering Conflicts best resolved by higher-level reasoning –What is current state? –What overall goal are we attempting to accomplish? Same room as player Seek player Different room as player Arrive door Player exits room Enter room where player is Arrive door Seek player