Games Programming III (TGP2281) – T1, 2010/2011 Tactical & Strategic AI John See 10 Jan 2011.

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

AI Pathfinding Representing the Search Space
Pathfinding AI John See 29 Nov, 13 Dec 2010.
1 CO Games Development 2 Week 15 Terrain Analysis Gareth Bellaby.
Multi-tiered AI Patrick Schmid. Multi-tiered AI We already saw a presentation about this topic Remember Ke‘s presentation? Short recap.
Pathfinding Basic Methods.
Half life 2/ Counter Strike: Source bot Charlie Cross CIS
CSE 380 – Computer Game Programming Pathfinding AI
Rule Based Systems Michael J. Watts
Generated Waypoint Efficiency: The efficiency considered here is defined as follows: As can be seen from the graph, for the obstruction radius values (200,
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
1 AI for Computer Game Developers Finite state machines Path finding and waypoints A-Star path finding.
Regression. So far, we've been looking at classification problems, in which the y values are either 0 or 1. Now we'll briefly consider the case where.
Simple Neural Nets For Pattern Classification
Games Programming III (TGP2281) – T1, 2010/2011 Game AI Fundamentals John See 15 November 2010.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Digital Image Processing
Chapter 5.4 Artificial Intelligence: Pathfinding.
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
Tactical and Strategic Reasoning  Covers…  Deducing tactical situations from sketchy (limited) information  Using tactical situations to make decisions.
ALGEBRA, EQUATIONS AND FORMULAE. INTRODUCTION  Algebra essentially involves the substitution of letters for numbers in calculations, so that we can establish.
Game Theory.
The Greedy Wall Building algorithm Rami Khouri. Ideal definition of Wall Either keeps valuable assets in, or enemies out…mostly keep enemies out Impassable,
Curve Modeling Bézier Curves
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
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.
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.
Tracking a Moving Object with a Binary Sensor Network J. Aslam, Z. Butler, V. Crespi, G. Cybenko and D. Rus Presenter: Qiang Jing.
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Demo. Overview Overall the project has two main goals: 1) Develop a method to use sensor data to determine behavior probability. 2) Use the behavior probability.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
A Distributed Clustering Framework for MANETS Mohit Garg, IIT Bombay RK Shyamasundar School of Tech. & Computer Science Tata Institute of Fundamental Research.
CONTENTS:  Introduction  What is neural network?  Models of neural networks  Applications  Phases in the neural network  Perceptron  Model of fire.
March 16 & 21, Csci 2111: Data and File Structures Week 9, Lectures 1 & 2 Indexed Sequential File Access and Prefix B+ Trees.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Multiple alignment: Feng- Doolittle algorithm. Why multiple alignments? Alignment of more than two sequences Usually gives better information about conserved.
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.
Data Communications and Networking Chapter 11 Routing in Switched Networks References: Book Chapters 12.1, 12.3 Data and Computer Communications, 8th edition.
Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.
Adrian Treuille, Seth Cooper, Zoran Popović 2006 Walter Kerrebijn
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
WORLD NAVIGATION Don’t Fall Asleep Through These Topics  Tile Graphs  Points of Visibility  NavMesh  Path Smoothing  Hierarchical Pathfinding.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
F.E.A.R. Game AI Evaluation by Robert Rak. What is F.E.A.R. ? FEAR is a First Person Shooter game Player takes on the role of an elite strike force team.
Behavior-based Multirobot Architectures. Why Behavior Based Control for Multi-Robot Teams? Multi-Robot control naturally grew out of single robot control.
COMP 417 – Jan 12 th, 2006 Guest Lecturer: David Meger Topic: Camera Networks for Robot Localization.
1 7-Jan-16 S Ward Abingdon and Witney College Dynamic Routing CCNA Exploration Semester 2 Chapter 3.
Interactive Control of Avatars Animated with Human Motion Data By: Jehee Lee, Jinxiang Chai, Paul S. A. Reitsma, Jessica K. Hodgins, Nancy S. Pollard Presented.
Artificial Intelligence in Game Design Influence Maps and Decision Making.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Fast SLAM Simultaneous Localization And Mapping using Particle Filter A geometric approach (as opposed to discretization approach)‏ Subhrajit Bhattacharya.
1 CO Games Development 2 Week 16 Blackboard Model Gareth Bellaby.
CSCE 552 Spring 2010 AI (III) By Jijun Tang. A* Pathfinding Directed search algorithm used for finding an optimal path through the game world Used knowledge.
1 CO Games Development 1 Week 9 - part 2 Pathfinding Considerations Gareth Bellaby.
1 CO Games Development 2 Week 13 Influence Maps Gareth Bellaby.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Evolutionary Computing Systems Lab (ECSL), University of Nevada, Reno 1 Authors : Siming Liu, Christopher Ballinger, Sushil Louis
Network Layer COMPUTER NETWORKS Networking Standards (Network LAYER)
Chapter 5.4 Artificial Intelligence: Pathfinding
Games and AI.
Application of Artificial Intelligence and Graphics to Support a Three-Dimensional Game Chris Cummings.
Movement in a full and dynamic environment using a limited influence map Paulo Lafeta Ferreira Artificial Intelligence for Games – CS 580 Professor: Steve.
Enemy and Friendly AIs Richard Gesick.
CIS 488/588 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Games Programming III (TGP2281) – T1, 2010/2011 Tactical & Strategic AI John See 10 Jan 2011

Games Programming III (TGP2281) – T1, 2010/2011 Tactical & Strategic AI in Millington’s Model

Games Programming III (TGP2281) – T1, 2010/2011 Waypoint Tactics A waypoint – A single position in the game level (“nodes”, “representative points” used for pathfinding) To use waypoints tactically  need to add more data to the nodes (not just location info) Some examples of use of waypoints to represent positions in the level with unusual tactical features Normally the level designer have some say in this

Games Programming III (TGP2281) – T1, 2010/2011 Tactical Locations Waypoints used for tactical purposes are sometimes called – “rally points”. E.g. To mark a fixed safe location for character to retreat if losing fight (defensive) To mark a pre-determined hiding spot that can ambush or snipe incoming enemy (offensive) To move secretly in shadow areas without being detected (stealth) Many more!

Games Programming III (TGP2281) – T1, 2010/2011 Tactical Points NOT THE BEST pathfinding points Although common to combine two sets of waypoints (one for tactical, one for pathfinding), not efficient nor flexible E.g. Cover and sniping waypoint nodes are not useful for pathfinding! Result in unrealistic movements within level

Games Programming III (TGP2281) – T1, 2010/2011 Primitive and Compound Tactics Most games have a set of pre-defined tactical qualities (e.g. sniping, shadow, cover, etc.). These are primitive defined tactics Combination of these primitive tactics result in locations with compound tactical qualities. E.g. Sniper locations – Points that have combination of both cover points and high-visibility points. A point can have both defensive and offensive tactical features.

Games Programming III (TGP2281) – T1, 2010/2011 Primitive and Compound Tactics For this e.g. how is an ambush point constructed from primitive tactical locations?

Games Programming III (TGP2281) – T1, 2010/2011 More Compound Tactics – Waypoint Graphs Waypoints can be CONNECTED to form waypoint graphs (similar to pathfinding graphs) when the waypoints defined are not isolated/separated Where is the best spot for a hit-and-run move? What are some problems using waypoint graphs?

Games Programming III (TGP2281) – T1, 2010/2011 Continuous Tactics Marking locations with numerical values (able to use fuzzy logic and probabilities) instead of Boolean values E.g. A waypoint will have a value for cover feature (0.7) and visibility feature (0.9) In choosing between a few cover points to go, choose one that has better/higher value Using fuzzy logic rules can allow us to combine these values, E.g. Sniper (value) = cover (value) AND visibility (value) Sniper = MIN(0.7, 0.9) = 0.7

Games Programming III (TGP2281) – T1, 2010/2011 Using Tactical Locations How do we build a tactical mechanism within the character AI? Three approaches: 1.Controlling tactical movement (simple method) 2.Incorporate tactical information into decision- making 3.Use tactical information during pathfinding to produce character motion that is always tactically aware

Games Programming III (TGP2281) – T1, 2010/ Tactical Movement Tactical waypoints are queried during game when the character AI needs to make a tactical move E.g. Character needs to reload bullets, it queries the tactical waypoints in the immediate area to look for “nearest suitable location” to stop and reload, before continuing This method: Action decision is carried out first, then apply tactical information to achieve its decision Some limitation in realism, and not able to use tactical information to influence decision-making due to limited use.

Games Programming III (TGP2281) – T1, 2010/2011 Give the “decision-maker” access to tactical information, just like any other game world information DT example: SM: Trigger transitions only when certain waypoints are available and/or fulfill required numeric value (if used) 2. Tactical Information in Decision-Making

Games Programming III (TGP2281) – T1, 2010/ Tactical Information during Pathfinding Relatively simple extension of basic pathfinding. Rather than finding shortest/quickest path, it takes into consideration tactical situation of game Simplest way is to manipulate graph connection costs (by adding “tactical cost” to locations that are dangerous or reducing “tactical cost” at locations that are easy)

Games Programming III (TGP2281) – T1, 2010/2011 Tactical Analyses Sometimes known as influence maps – a technique pioneered and widely used in RTS games where the AI keeps track of areas of military influence in game Can also be used in simulation/evolution games, FPSs or MMOs Overwhelming majority of current implementations are based on tile-based grid worlds. Even for non-tile-based worlds, a grid can be imposed over the geometry for tactical analyses.

Games Programming III (TGP2281) – T1, 2010/2011 Influence Maps Keeps track of current balance of military influence at each location in level Factors… E.g. proximity of military unit, proximity of well- defended base, duration since a unit last occupied a location, terrain, current financial state, weather, etc. In many games, simple influence maps are constructed based on these popular factors: 1.Proximity of enemy units and bases 2.Relative military power

Games Programming III (TGP2281) – T1, 2010/2011 Influence Calculations Concept: Influence is taken to drop off with distance. The farther away from a unit/base/etc., the lesser the value of their influence Linear model: Non-linear models: In practice, linear drop off is perfectly reasonable, and is also faster to compute

Games Programming III (TGP2281) – T1, 2010/2011 Influence Map Calculations To calculate the map, need to consider each unit in the game for each location in the level. Up to billions of calculations may be needed! Execution time: O(nm), Memory: O(m), where m number of locations, n number of units. 3 approaches: Limited Radius of Effect Convolution Filters Map Flooding

Games Programming III (TGP2281) – T1, 2010/2011 Limited Radius of Effect LIMIT the radius of influence effect for each unit Each unit has a maximum radius of influence, beyond that radius, no computation is required Use a threshold influence, I t (beyond which influence is zero), the radius is given by This approach results in O(nr) in time, where r is number of locations within the average radius of a unit. r << m Much faster! Any disadvantages?

Games Programming III (TGP2281) – T1, 2010/2011 Example: Influence Map

Games Programming III (TGP2281) – T1, 2010/2011 Influence Map: Examples Influence maps allows AI to see which areas of the game are safe, which areas to avoid, where the border between teams are weakest Example: Security influence map

Games Programming III (TGP2281) – T1, 2010/2011 Dealing with Unknowns Typically, games don’t allow players to see all the units in the game. Vision can be additionally limited by hills and other terrain features – Often known as “Fog-of-war” Should AIs have full knowledge of the entire map? Or should they be subjected to “fog-of-war” as well? With the partial knowledge, one set of tactical analyses is required per side in the game (incl. all AI sides).

Games Programming III (TGP2281) – T1, 2010/2011 Combining Tactical Analyses Multi-layer analyses involved combining a few influence maps into a composite influence map. Example: To find best location to build tower, consider: Wide range of visibility, secured location, far from other towers to avoid redundancy (3 maps) To get a single influence value, the 3 base tactical analyses can be combined by multiplication (or addition, etc.) Quality = Security x Visibility x Distance (or if tower influence is used instead of distance) Quality = Security x Visibility Tower Influence

Games Programming III (TGP2281) – T1, 2010/2011 Combining Tactical Analyses

Games Programming III (TGP2281) – T1, 2010/2011 Structure for Tactical Analyses Different types of tactical analyses can be distinguished by its properties and frequency of updating needed

Games Programming III (TGP2281) – T1, 2010/2011 Tactical Pathfinding Similar to regular pathfinding (same techniques/algos), only modification is the cost function used – extended to tactical info Cost function influenced by two criteria: 1.Distance/time 2.Tactical Information Cost of a connection given by a formula where D is the distance/time of connection, w i is the weighing factor for each tactic T i and i is the number of tactics supported.

Games Programming III (TGP2281) – T1, 2010/2011 Tactic Weights & Concern Blending In the previous equation, the real-valued quality for each tactic is multiplied by a weighting factor before summing into the final cost value. Locations with high tactics weight will be avoided Locations with low tactics weight will be favoured Weights can be negative, BUT careful not to have negative overall weight, which may result in negative overall cost! Tactical costs can be pre-calculated if they are static (terrain, visibility). If they are dynamic (military power, number of units), they must be updated time-to-time.

Games Programming III (TGP2281) – T1, 2010/2011 Customizing weights In certain games, different units can have different sets of tactical weights (w) based on their characteristic. Example: Reconnaissance units, light infantry, heavy artillery. Tactical info: terrain difficulty, visibility, proximity of enemy units

Games Programming III (TGP2281) – T1, 2010/2011 Customizing weights Weights can also be customized according to a unit’s aggression E.g. Healthy units finds paths in normal way. When it is injured, the weight for proximity to enemy can be increased to make the unit choose a more conservative route back to base. Customizing weights for different units

Games Programming III (TGP2281) – T1, 2010/2011 Implications on heuristic-based pathfinding When modifying pathfinding heuristics (especially for A*), make sure heuristic measure is not reduced too much due to subtraction of tactical costs, or increased too much due to addition of tactical costs.  May result in underestimating or overestimating heuristic

Games Programming III (TGP2281) – T1, 2010/2011 Coordinated Action To coordinate multiple characters to cooperate together to get their job done, some structure need to be in place. Two categories: 1.Team/Group AI (a group of AI NPCs, fully AI) 2.Cooperative AI (AI cooperates with a human player in a team) Common Qs: Should individual AIs “speak” to each other, and make collective decisions? Should a central “command center/brain” give orders and instructions to each individual AI? Can we have a bit of both?

Games Programming III (TGP2281) – T1, 2010/2011 Multi-Tier AI – Top-Down Approach Highest level AI makes a decision, passes it down to next level, which uses its instruction to make its decision, and pass again down to the lowest level Example: Military Hierarchy

Games Programming III (TGP2281) – T1, 2010/2011 Multi-Tier AI – Bottom-Up Approach Lowest level AI algorithms take their own initiative to make decisions, then use higher level algorithms to provide information on which they can base their actions Example: Autonomous decision making by individual characters that can influence the overall game, Squad- based Strategy games, Evolution-based games “Emergent cooperation”

Games Programming III (TGP2281) – T1, 2010/2011 Multi-Tier AI – Structural Example At higher levels, decision making or tactics are performed. At lower levels, pathfinding and movement behaviors carry out high-level orders