Inaction breeds doubt and fear. Action breeds confidence and courage. If you want to conquer fear, do not sit home and think about it.

Similar documents
CS 354R: Computer Game Technology

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

All theory, no practice

Lecture 1. CMPS 146, Fall Josh McCoy

Artificial Intelligence

Basic AI Techniques for o N P N C P C Be B h e a h v a i v ou o r u s: s FS F T S N

Design task: Pacman. Software engineering Szoftvertechnológia. Dr. Balázs Simon BME, IIT

A Character Decision-Making System for FINAL FANTASY XV by Combining Behavior Trees and State Machines

Principles of Computer Game Design and Implementation. Lecture 29

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

IMGD 1001: Programming Practices; Artificial Intelligence

the gamedesigninitiative at cornell university Lecture 23 Strategic AI

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

CRYPTOSHOOTER MULTI AGENT BASED SECRET COMMUNICATION IN AUGMENTED VIRTUALITY

IMGD 1001: Programming Practices; Artificial Intelligence

Chapter 1:Object Interaction with Blueprints. Creating a project and the first level

CS 387/680: GAME AI DECISION MAKING. 4/19/2016 Instructor: Santiago Ontañón

CS 387/680: GAME AI TACTIC AND STRATEGY

Introduction (concepts and definitions)

the gamedesigninitiative at cornell university Lecture 10 Game Architecture

Chapter 5.3 Artificial Intelligence: Agents, Architecture, and Techniques

DUNGEON THE ADVENTURE OF THE RINGS

Project 2: Searching and Learning in Pac-Man

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

Advanced Computer Graphics

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

Artificial Intelligence (AI) Artificial Intelligence Part I. Intelligence (wikipedia) AI (wikipedia) ! What is intelligence?

Adding in 3D Models and Animations

Pac-Man EXTREME!!!!! Kim Dauber and Rachael Devlin Fall 2017

Tac Due: Sep. 26, 2012

Artificial Intelligence for Games. Santa Clara University, 2012

Automatic Game AI Design by the Use of UCT for Dead-End

INTRODUCTION TO GAME AI

Tutorial: Creating maze games

Game Maker Tutorial Creating Maze Games Written by Mark Overmars

CSSE220 BomberMan programming assignment Team Project

Gameplay as On-Line Mediation Search

Examples Debug Intro BT Intro BT Edit Real Debug

TRY-TO-SURVIVE-ASAURUS

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

Creating Journey In AgentCubes

Game Artificial Intelligence ( CS 4731/7632 )

Today s Topics. Video Game AI: Lecture 2 History of Game AI. Pong (1972) A selective history of video game AI

RPG CREATOR QUICKSTART

The Game Development Process

Kodu Module 1: Eating Apples in the Kodu World

A tutorial on scripted sequences & custsenes creation

WRITTEN BY ED TEIXEIRA INTERIOR ARTWORK BY JAMES SMYTH COVER BY PAUL KIME DIGITALLY EDITED BY CRAIG ANDREWS

UMBC 671 Midterm Exam 19 October 2009

Final Project Specification

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

Abandon. 1. Everything comes to life! 1.1. Introduction Character Biography

Statistical Analysis of Nuel Tournaments Department of Statistics University of California, Berkeley

Combine Like Terms

Game AI CS CS 4730 Computer Game Design. Some slides courtesy Tiffany Barnes, NCSU

Introduction to Game Design. Truong Tuan Anh CSE-HCMUT

Project NMCGJ : Pac-Man Game

G54GAM - Games. So.ware architecture of a game

Grading Delays. We don t have permission to grade you (yet) We re working with tstaff on a solution We ll get grades back to you as soon as we can

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

What is a Game? See also references at end of slides (if any)

The Double Helix: AI for Simulation & Gaming

Principles of Computer Game Design and Implementation. Lecture 20

Overlord. Phoenix. Poisoned Blade. Poison Bolt. Poison Cloud. Poison Spit. Poison Spit All Red Hot Reflect All Rupture. Search Party.

"!" - Game Modding and Development Kit (A Work Nearly Done) '08-'10. Asset Browser

A Model-based Approach to Optimizing Ms. Pac-Man Game Strategies in Real Time

Gameplay Presented by: Marcin Chady

Create Your Own World

Raven: An Overview 12/2/14. Raven Game. New Techniques in Raven. Familiar Techniques in Raven

Hierarchical Controller for Robotic Soccer

USING A FUZZY LOGIC CONTROL SYSTEM FOR AN XPILOT COMBAT AGENT ANDREW HUBLEY AND GARY PARKER

Lecture 1: Introduction and Preliminaries

Yu Li ARTIFICIAL INTELLIGENCE IN UNITY GAME ENGINE

PlayStation 4 500GB Uncharted: The Nathan Drake Collection Bundle - $ delivered

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

Scheduling and Motion Planning of irobot Roomba

Introduction. Modding Kit Feature List

Procedural Content Generation

Procedural Content Generation

the gamedesigninitiative at cornell university Lecture 20 Optimizing Behavior

CS 480: GAME AI DECISION MAKING AND SCRIPTING

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

Getting Started with Osmo Coding. Updated

Artificial Intelligence Paper Presentation

ICS 151 Final. (Last Name) (First Name)

Analyzing Games.

NIGHTMARE FOREST Dead Run

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

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

CS 387/680: GAME AI DECISION MAKING

NPC Awareness in a 2D Stealth Platformer

Prof. Sameer Singh CS 175: PROJECTS IN AI (IN MINECRAFT) WINTER April 6, 2017

2048: An Autonomous Solver

RANDOM MISSION CONTENTS TAKING OBJECTIVES WHICH MISSION? WHEN DO YOU WIN THERE ARE NO DRAWS PICK A MISSION RANDOM MISSIONS

Program Testing and Analysis: Symbolic and Concolic Testing (Part 2) Dr. Michael Pradel Software Lab, TU Darmstadt

Efficiency and Effectiveness of Game AI

Gilbert Peterson and Diane J. Cook University of Texas at Arlington Box 19015, Arlington, TX

PROFILE. Jonathan Sherer 9/10/2015 1

Dipartimento di Elettronica Informazione e Bioingegneria Robotics

Game Overview 2 Setting 3 Story 3 Main Objective 3. Game Components 3. Rules 4 Game Setup 4 Turn Sequence 5 General Rules 9 End Game Conditions 9

Transcription:

Inaction breeds doubt and fear. Action breeds confidence and courage. If you want to conquer fear, do not sit home and think about it. Go out and get busy. -- Dale Carnegie

Announcements AIIDE 2015 https://youtu.be/ziamorsu3z0?list=plxgbbc3oumgg7ouylfv XQLR6HKcoglCfG&t=1713 HW3. http://osi.gatech.edu/ HW4 is posted, due this Sunday

The story thus far Review

N-1: formations 1. What s the problem with independent shortest distance navigation with groups? 2. What s a simple solution, and its drawbacks? Other workarounds? 3. Is it always sensible to replan paths when problems occur? 4. What are 3 ways of implementing fixed formations? 5. Discuss some problems with entities of different sizes.

Decision Making FSMs 2018-02-13 B Ch2, M 5.1,5.3

Decision Making Historically a mathematical model of computation Wikipedia Classic AI: making the optimal choice of action (given what is known or is knowable at the time) that maximizes the chance of achieving a goal or receiving a reward (or minimizes penalty/cost) Game AI: choosing the right goal/behavior/animation to support the experience Decision-making must connect directly to animation so player can see the results of decision-making directly (explainable AI) What animation do I play now? Where should I move?

Most game agents do more than move Shoot Patrol Farm Sleep Hide Hunt We will call these states

Most game agents go through more than one state Game agents will have different sets of states, and different ways of moving through those states based on their purpose in the game: Soldier: Patrol -> Shoot -> Hunt Farmer/Villager: Farm -> Patrol -> Sleep

FSM theory A (model of a) device which has a finite number of states (S) an input vocabulary (I) a transition function T(s,i) s a start state I zero or more final states S Behavior Can only be in one state at a given moment in time Can make transitions from one state to another or to cause an output (action) to take place.

FSMs in Practice Each state represents some desired behavior Transition function often resides across states Each state determines subsequent states Can poll the world, or respond to events (more on this later) Support actions that depend on state & triggering event (Mealy) as well as entry & exit actions associated with states (Moore)

FSM as GAI Character AI modeled as sequence of mental states World events (can) force a change in state Mental model easy to grasp (for all) Gather Treasure Monster Dead Monster In Sight No Monster Fight Flee Cornered Jarret Raim

Question 1 Using the graph form, design/visualize an FSM for a security guard that patrols a school after hours. If it sees the player it needs to seek the player and give them a lecture till the player can slip away. Otherwise switch between Idle and Patrol. States = {Idle, Patrol, Seek, Lecture} Feel free to make up variables.

Idle > 5 seconds in state Patrol seesplayer!seesplayer seesplayer!seesplayer Seek closeenough Lecture

Mealy & Moore Mealy Output = F( state, input ) Moore Output = F( state ) State State OnEnter / OnExit Search Search Growl / Sigh Idle Flee P / Yelp Idle Relief / Startle P Flee Yelp / Sigh

State Transition Table Current State Condition State Transition Gather Treasure Monster Flee Flee Cornered Fight Flee No Monster Gather Treasure Fight Monster Dead Gather Treasure Monster In Sight Gather Treasure Flee No Monster Monster Dead Fight Cornered

Advantages Ubiquitous (not only in digital games) Quick and simple to code (can be) Easy* to debug Fast: Small computational overhead Intuitive Flexible Easy for designers without coding knowledge

Disadvantages When it fails, fails hard: A transition from one state to another requires forethought (get stuck in a state or can t do the correct next action) Number of states can grow fast Exponentially with number of events in world (multiple ways to react to same event given other variables) Number of transitions can grow even faster Doesn t work with sequences of actions/memory

Offline Debugging Logging Verbosity Levels Online Debugging Graphical representation is modified based on AI state Command line to modify AI behavior on the fly. Debugging FSM s

Where we see that they re incredibly common, effective, and useful FSM EXAMPLES

Activity States: Transitions: See also https://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1

FSM Examples: Pac Man Red: Shadow, blinky pursuer or chaser Chase target: pac-man s tile Pink: Speedy, pinky ambusher Chase target: pac-man s tile + 4 ahead Blue: Bashful, inky whimsical Chase target: double vector from red ghost to (pac + 2 ahead) Orange: Pokey, Clyde feigning ignorance Chase target: dist < 8? scatter tile : pac-man s tile http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior

Prey Example * Usually animations are linked to states, transitions, or both.

Hierarchical FSM Example Equivalent to regular FSMs Easier to think about encapsulation

http://ai-depot.com/finitestatemachines/fsm-framework.html FSM: Quake dog monster SPAWN ATTACK IDLE DIE Main input event act. Dog specific act. (gen.) monster act.

FSM Examples Pac-Man FPSs What might be states? NPCs only?

FSM Examples Pac-Man FPSs Sports Simulations What might be states?

FSM Examples Pac-Man FPSs Sports Simulations RTSs What might be states?

UnrealScript Example shift up stall shift up 1st 2nd turn key on turn key on shift down off on idle shift down turn key off turn key off shift up stall shift down reverse

public void runstatemachine (Event e) { switch (state) { case 0: //off if (e.isturnon()) { power=true; state=1;} break; case 1: //on if (e.isturnon()) { startengine(); state=2;} else if (e.isturnoff()) { power=false; state=0;} break; case 2: //idle makeenginesound(); if (e.isupshift()) { gear=1; state=3;} else if (e.isdownshift()) { gear=-1; state=9;} else if (e.isturnoff()) { stopengine(); state=1;} break; } }

Choices have consequences FSM IMPLEMENTATIONS

Trajectory Update HW4: A* To come: More decision making Planning Decision trees Behavior trees Rule based systems Fuzzy Logic Markov Systems