the question of whether computers can think is like the question of whether submarines can swim -- Dijkstra

Similar documents
the question of whether computers can think is like the question of whether submarines can swim -- Dijkstra

Game Artificial Intelligence ( CS 4731/7632 )

Heuristics, and what to do if you don t know what to do. Carl Hultquist

Solving Problems by Searching

Search then involves moving from state-to-state in the problem space to find a goal (or to terminate without finding a goal).

Principles of Computer Game Design and Implementation. Lecture 29

Simple Search Algorithms

Applying Theta* in Modern Game

Strategic and Tactical Reasoning with Waypoints Lars Lidén Valve Software

Informed Search. Read AIMA Some materials will not be covered in lecture, but will be on the midterm.

Problem 1. (15 points) Consider the so-called Cryptarithmetic problem shown below.

Tac Due: Sep. 26, 2012

Homework Assignment #1

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Heuristics & Pattern Databases for Search Dan Weld

arxiv: v1 [cs.cy] 24 Nov 2015

Experimental Comparison of Uninformed and Heuristic AI Algorithms for N Puzzle Solution

CS 387/680: GAME AI TACTIC AND STRATEGY

UMBC 671 Midterm Exam 19 October 2009

Artificial Intelligence

Tac 3 Feedback. Movement too sensitive/not sensitive enough Play around with it until you find something smooth

Motion planning in mobile robots. Britta Schulte 3. November 2014

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

CS 480: GAME AI INTRODUCTION TO GAME AI. 4/3/2012 Santiago Ontañón

CS 680: GAME AI INTRODUCTION TO GAME AI. 1/9/2012 Santiago Ontañón

Artificial Intelligence Lecture 3

INTRODUCTION TO GAME AI

An Approach to Maze Generation AI, and Pathfinding in a Simple Horror Game

Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing

Federico Forti, Erdi Izgi, Varalika Rathore, Francesco Forti

22c:145 Artificial Intelligence

CS 171, Intro to A.I. Midterm Exam Fall Quarter, 2016

CS 480: GAME AI TACTIC AND STRATEGY. 5/15/2012 Santiago Ontañón

10/5/2015. Constraint Satisfaction Problems. Example: Cryptarithmetic. Example: Map-coloring. Example: Map-coloring. Constraint Satisfaction Problems

Neural Networks for Real-time Pathfinding in Computer Games

E190Q Lecture 15 Autonomous Robot Navigation

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46

2048: An Autonomous Solver

Unit 12: Artificial Intelligence CS 101, Fall 2018

1.4. Artificial Stupidity: The Art of Intentional Mistakes. Lars Lidén.

Artificial Intelligence Uninformed search

Problem Solving and Search

INTRODUCTION TO GAME AI

UMBC CMSC 671 Midterm Exam 22 October 2012

Gameplay as On-Line Mediation Search

A Level Computer Science H446/02 Algorithms and programming. Practice paper - Set 1. Time allowed: 2 hours 30 minutes

Who am I? AI in Computer Games. Goals. AI in Computer Games. History Game A(I?)

CS 387/680: GAME AI AI FOR FIRST-PERSON SHOOTERS

Practice Session 2. HW 1 Review

Problem. Operator or successor function - for any state x returns s(x), the set of states reachable from x with one action

CS 387: GAME AI BOARD GAMES. 5/24/2016 Instructor: Santiago Ontañón

AI in Computer Games. AI in Computer Games. Goals. Game A(I?) History Game categories

Artificial Intelligence ( CS 365 ) IMPLEMENTATION OF AI SCRIPT GENERATOR USING DYNAMIC SCRIPTING FOR AOE2 GAME

AIMA 3.5. Smarter Search. David Cline

Towards Adaptability of Demonstration-Based Training of NPC Behavior

Artificial Intelligence

Games and Adversarial Search II

Proactive Indoor Navigation using Commercial Smart-phones

CS188: Section Handout 1, Uninformed Search SOLUTIONS

Artificial Intelligence for Games

Learning Artificial Intelligence in Large-Scale Video Games

CSE 573 Problem Set 1. Answers on 10/17/08

COMP9414: Artificial Intelligence Problem Solving and Search

MULTI AGENT SYSTEM WITH ARTIFICIAL INTELLIGENCE

IMGD 1001: Programming Practices; Artificial Intelligence

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

A Multi-Agent Potential Field-Based Bot for a Full RTS Game Scenario

15-381: Artificial Intelligence Assignment 3: Midterm Review

FU-Fighters. The Soccer Robots of Freie Universität Berlin. Why RoboCup? What is RoboCup?

Heuristic Search with Pre-Computed Databases

CS 354R: Computer Game Technology

Maze Solving Algorithms for Micro Mouse

Moving Path Planning Forward

Game AI Overview. What is Ar3ficial Intelligence. AI in Games. AI in Game. Scripted AI. Introduc3on

: Principles of Automated Reasoning and Decision Making Midterm

Making Simple Decisions CS3523 AI for Computer Games The University of Aberdeen

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

Reinforcement Learning Simulations and Robotics

Informatics 2D: Tutorial 1 (Solutions)

IMGD 1001: Programming Practices; Artificial Intelligence

the gamedesigninitiative at cornell university Lecture 10 Game Architecture

5.1 State-Space Search Problems

A Historical Example One of the most famous problems in graph theory is the bridges of Konigsberg. The Real Koningsberg

Implementation and Comparison the Dynamic Pathfinding Algorithm and Two Modified A* Pathfinding Algorithms in a Car Racing Game

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

UNIVERSITY of PENNSYLVANIA CIS 391/521: Fundamentals of AI Midterm 1, Spring 2010

1. Compare between monotonic and commutative production system. 2. What is uninformed (or blind) search and how does it differ from informed (or

COMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )

Reactive Planning for Micromanagement in RTS Games

Game Playing for a Variant of Mancala Board Game (Pallanguzhi)

Motion Planning in Dynamic Environments

Common Mistakes. Quick sort. Only choosing one pivot per iteration. At each iteration, one pivot per sublist should be chosen.

The Suffering: A Game AI Case Study

CS325 Artificial Intelligence Ch. 5, Games!

CSCI 445 Laurent Itti. Group Robotics. Introduction to Robotics L. Itti & M. J. Mataric 1

MFF UK Prague

Surveillance strategies for autonomous mobile robots. Nicola Basilico Department of Computer Science University of Milan

CSC384 Introduction to Artificial Intelligence : Heuristic Search

Agent Smith: An Application of Neural Networks to Directing Intelligent Agents in a Game Environment

Transcription:

the question of whether computers can think is like the question of whether submarines can swim -- Dijkstra Game AI: The set of algorithms, representations, tools, and tricks that support the creation and management of real-time digital experiences

http://game-ai.gatech.edu/sites/default/files/documents/documentation/object-hierarchy.png Sprite Thing GameWorld core.py core.py core.py Mover core.py Obstacle core.py Agent Resource Bullet core.py core.py core.py Navigator core.py gridnavigator.py Grid Navigator gridnavigator.py Greedy Grid Navigator mycreategrid.py

PREVIOUSLY ON

Class N-1 1. How would you describe AI (generally), to not us? 2. Game AI is really about The I of I. Which is what? Supporting the P E which is all about making the game more enjoyable Doing all the things that a(nother) player or designer 3. What are ways Game AI differs from Academic AI? 4. (academic) AI in games vs. AI for games. What s that? 5. What is the complexity fallacy? 6. The essence of a game is a g l and set of r_? 7. What are three big components of game AI in-game? 8. What is a way game AI is used out-of-game?

Common (game) AI Tricks? Move before firing no cheap shots Be visible Have horrible aim (being Rambo is fun) Miss the first time Warn the player Attack kung fu style (Fist of Fury; BL vs School) Tell the player what you are doing (especially companions) React to own mistakes Pull back at the last minute Intentional vulnerabilities or predictable patterns Liden, Artificial Stupidity: The Art of Intentional Mistakes. AI Game Programming Wisdom.

Common Game AI techniques? Path planning, obstacle avoidance Decision making Finite state machines Trigger systems Behavior trees Robotics architectures Scripting, trigger systems Command hierarchies strategic, tactical, individual combat Emergent behavior flocking, crowds Formations Smart environments Terrain analysis finding resource, ambush points Dynamic difficulty adjustment Drama management Procedural Content Generation

Intelligent vs. random

Graphs, Search, & Path Planning 2016-05-19

Graphs What is a graph? What defines a graph? How can we represent them? How does representation effect search? Applications to GAI? See Buckland CH 5 for a refresher

Graphs (2) G = {N,E}, N: Nodes, E: Edges (with cost)

Risk

RTS Dependency Tree

Graphs Killer App in GAI Navigation / Pathfinding Navgraph: abstraction of all locations and their connections Cost / weight can represent terrain features (water, mud, hill), stealth (sound to traverse), etc What to do when Map features move Map is continuous, or 100K+ nodes? 3D spaces?

Graph Search Uninformed (all nodes are same) DFS (stack lifo), BFS (queue fifo) Iterative-deepening (Depth-limited) Informed (pick order of node expansion) Dijkstra guarantee shortest path (Elog 2 N) A* (IDA*). Dijkstra + heuristic D* http://en.wikipedia.org/wiki/a*_search_algorithm

Heuristics [dictionary] A rule of thumb, simplification, or educated guess that reduces or limits the search for solutions in domains that are difficult and poorly understood. h(n) = estimated cost of cheapest path from n to goal (with goal == 0)

Path finding problem solved, right? Hall of shame: Compilation http://www.youtube.com/watch?v=lw9g-8gl5o0 Sim City (1, 2 5) https://www.youtube.com/watch?v=mxmnzvbbamm Half-Life 2 http://www.youtube.com/watch?v=wzyezvi46uw Fable III DOTA 1+2 WoW

World Representation Ghallab, Nau, Traverso example (from Automated Planning textbook) A={pickup, putdown, load, unload, move} S: 5 locations, 3 piles per loc, 3 cranes, 100 crates State transition system has 10 277 states (10 190 x particles in universe)

Path finding models 1. Tile-based graph grid navigation 2. Path Networks / Points of Visibility NavGraph 3. Expanded Geometry 4. NavMesh

Model 1: Grid Navigation 2D tile representation mapped to floor/level Squares, hex; 8 or 6 neighbors / connectivity Mainly RTS games One entity/unit per cell Each cell can be assigned terrain type Bit mask for non-traversable areas Navigation: A*, Dijkstra

Path Planner Initial state (cell), Goal state (cell) Each cell is a state agent can occupy Sort successors, try one at a time (backtrack) Heuristic: Manhattan or straight-line distance Each successor stores who generated it

Grid navigation: pros Discrete space is simple Can be generated algorithmically at runtime Good for large number of units A* works really well on grids (uniform action cost, not many tricky spots)

Grid navigation: cons Discretization wastes space Agent movement is jagged/awkward/blocky, though can be smoothed Some genres need continuous spaces Partial-blocking hurts validity Search must visit a lot of nodes (cells) Search spaces can quickly become huge E.g. 100x10 map == 100k nodes and ~78k edges

New Problems Generation Validity Quantization Converting an in-game position (for yourself or an object) into a graph node Localization Convert nodes back into game world locations (for interaction and movement)

Validity

String pulling Splines Hierarchical A*

M2: Path Networks POV: Points of visibility NavGraph (see B CH 8) Discretization of space into sparse network of nodes Two-tiered navigation system Local, continuous Remote Connects points visible to each other in all important areas of map Usually hand-tailored (can use flood-fill)

Waypoints