AI in games Roger Crawfis/Eric Fosler-Lussier CSE 786 Game Design.

Slides:



Advertisements
Similar presentations
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
Advertisements

SEMANTICALLY RICH EDUCATIONAL WORD GAMES ENHANCED BY SOFTWARE AGENTS Boyan Bontchev, Sergey Varbanov, Dessislava Vassileva INFOS 2011 Rzeszów - Polańczyk,
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Intelligent Agents Russell and Norvig: 2
Jenkins — Modular Perception and Control Brown Computer — ROUGH DRAFT ( ) 1 Workshop Introduction: Modular Perception.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Introduction to Learning.
CPSC 322 Introduction to Artificial Intelligence October 29, 2004.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
The Mobile Environment u Environment –something which exists in a space, a concept defined with respect to the kind of system in focus (boundary). u Two.
Evolving Neural Network Agents in the NERO Video Game Author : Kenneth O. Stanley, Bobby D. Bryant, and Risto Miikkulainen Presented by Yi Cheng Lin.
Design Patterns CS is not simply about programming
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Artificial Intelligence (AI) Addition to the lecture 11.
Lab 3 How’d it go?.
CS426 Game Programming II Dan Fleck. Why games?  While the ideas in this course are demonstrated programming games, they are useful in all parts of computer.
Artificial Intelligence By John Debovis & Keith Bright.
Artificial Intelligence in Game Design Problems and Goals.
Artificial Intelligence Introduction (2). What is Artificial Intelligence ?  making computers that think?  the automation of activities we associate.
Robotica Lecture 3. 2 Robot Control Robot control is the mean by which the sensing and action of a robot are coordinated The infinitely many possible.
Introduction GAM 376 Robin Burke Winter Outline Introductions Syllabus.
A Spring 2005 CS 426 Senior Project By Group 15 John Studebaker, Justin Gerthoffer, David Colborne CSE Dept., University of Nevada, Reno Advisors (CSE.
Survey of AI for games. AI vs. AI for games Traditional AI: – Made to handle unseen inputs, large state space – Too many options possible to compute an.
S556 SYSTEMS ANALYSIS & DESIGN Week 11. Creating a Vision (Solution) SLIS S556 2  Visioning:  Encourages you to think more systemically about your redesign.
Topics for Today Task planning for non-player characters Coping with player character interactions and their effect on narrative In Hamlet on the Holodeck,
Towards Cognitive Robotics Biointelligence Laboratory School of Computer Science and Engineering Seoul National University Christian.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
Robotica Lecture 3. 2 Robot Control Robot control is the mean by which the sensing and action of a robot are coordinated The infinitely many possible.
AI in Computer Gaming: The first person shooter Tyler Hulburd.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Motion Planning in Games Mark Overmars Utrecht University.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
University of Windsor School of Computer Science Topics in Artificial Intelligence Fall 2008 Sept 11, 2008.
Project “Smoke” N-core engine experiment Threading for Performance AND Features.
1 MMORPG Servers. 2 MMORPGs Features Avatar Avatar Levels Levels RPG Elements RPG Elements Mission Mission Chatting Chatting Society & Community Society.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
AI in games Roger Crawfis CSE 786 Game Design. AI vs. AI for games AI for games poses a number of unique design challenges AI for games poses a number.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VIII Chain of Responsibility, Strategy, State.
1 CMPT 275 High Level Design Phase Modularization.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex (can easily exceed 1M LOC) The larger your program,
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence and Searching CPSC 315 – Programming Studio Spring 2013 Project 2, Lecture 1 Adapted from slides of Yoonsuck Choe.
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 25 –Robotics Thursday –Robotics continued Home Work due next Tuesday –Ch. 13:
Distributed Models for Decision Support Jose Cuena & Sascha Ossowski Pesented by: Gal Moshitch & Rica Gonen.
Z556 Systems Analysis & Design Session 10 ILS Z556 1.
A Roadmap towards Machine Intelligence
CSE4AT3 Design Balancing Continued……………………………… …………………………………………..
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
We Have Not Yet Begun to Learn Rich Sutton AT&T Labs.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
From NARS to a Thinking Machine Pei Wang Temple University.
The Game Development Process: Artificial Intelligence.
Game Architecture Rabin is a good overview of everything to do with Games A lot of these slides come from the 1st edition CS 4455.
Problem Solving by Searching
Announcements Homework 3 due today (grace period through Friday)
CIS 488/588 Bruce R. Maxim UM-Dearborn
Interaction with artificial intelligence in games
Subsuption Architecture
CHAPTER I. of EVOLUTIONARY ROBOTICS Stefano Nolfi and Dario Floreano
Job for milkshape modeller
Area Coverage Problem Optimization by (local) Search
Presentation transcript:

AI in games Roger Crawfis/Eric Fosler-Lussier CSE 786 Game Design

AI vs. AI for games AI for games poses a number of unique design challenges AI for games poses a number of unique design challenges Traditional AI: Traditional AI: Made to handle unseen inputs, large state space Made to handle unseen inputs, large state space Too many options possible to compute an exact optimal solution Too many options possible to compute an exact optimal solution Engineering criteria: best possible performance Engineering criteria: best possible performance Game AI: Game AI: The game world is known, though it can still be large The game world is known, though it can still be large In a known world, optimal solutions can be precomputed In a known world, optimal solutions can be precomputed Entertainment criteria: smart enough to pose a challenge, but not smart enough to be undefeatible Entertainment criteria: smart enough to pose a challenge, but not smart enough to be undefeatible

Injecting AI into a Game Friend: Friend: autonomous, intelligent NPC helpmates autonomous, intelligent NPC helpmates Configurable (scripted) behaviors: different characters solve a problem in different ways Configurable (scripted) behaviors: different characters solve a problem in different ways Player may trade places with NPC: automation Player may trade places with NPC: automation Foe: Foe: Opponents get better with time Opponents get better with time Opponents are less predictable because the individuals’ behavior is not uniform Opponents are less predictable because the individuals’ behavior is not uniform Scene Clutter Scene Clutter Provides a richness to your environment. Provides a richness to your environment. Animals grazing, birds flying, people milling about, automobiles driving, etc. Animals grazing, birds flying, people milling about, automobiles driving, etc.

Goals for your games Prepare you for entertainment and ‘serious’ games Prepare you for entertainment and ‘serious’ games You must implement at least one of these features You must implement at least one of these features Improve over time Improve over time Goal-driven action decomposition Goal-driven action decomposition A* search A* search for path planning, with varying cost functions for different agents (different agents have different heuristics) for path planning, with varying cost functions for different agents (different agents have different heuristics) Game tree search Game tree search Emergent group behavior (flocking or formations) Emergent group behavior (flocking or formations) “Intelligent” interaction (e.g. speech/language) “Intelligent” interaction (e.g. speech/language) Your game AI must be data-driven, i.e. it must tune itself or otherwise interoperate with an arbitrary map/level loaded at runtime Your game AI must be data-driven, i.e. it must tune itself or otherwise interoperate with an arbitrary map/level loaded at runtime

Warning: AI is not an afterthought AI elements need to be designed in from the start AI elements need to be designed in from the start Configurable/scripted behavior Configurable/scripted behavior Data-driven map/level layouts Data-driven map/level layouts AI isn’t time-consuming to create, if coded from the start AI isn’t time-consuming to create, if coded from the start

Improving over time Agent behavior needs to be composed from small, modular, context-sensitive actions Agent behavior needs to be composed from small, modular, context-sensitive actions Evade-right if angle >90 and 90 and < 180 Reward good performance/punish bad Reward good performance/punish bad Each re-spawn can modify control strategy Each re-spawn can modify control strategy See good discussion in Buckland online book See good discussion in Buckland online book You can either perform training and freeze optimal play, or let the agent adapt to each user You can either perform training and freeze optimal play, or let the agent adapt to each user

Improving over time Example from Buckland (online) Ch 10: brainy aliens Example from Buckland (online) Ch 10: brainy aliens Map sensory input to behavior with a hidden layer Map sensory input to behavior with a hidden layer The time it stayed alive is fitness function The time it stayed alive is fitness function When alien dies, replace it with an evolved one When alien dies, replace it with an evolved one

Goal-driven behavior Multiple steps required to achieve a desired effect Multiple steps required to achieve a desired effect Useful in Useful in Action-adventure type games -puzzles to solve Action-adventure type games -puzzles to solve RPG - task underlings with a multi-step job RPG - task underlings with a multi-step job Good discussion in Buckland PGAIE ch. 9 Good discussion in Buckland PGAIE ch. 9 Each ‘goal’ is an instance of a composite class Each ‘goal’ is an instance of a composite class Many different goals can be created with minimal coding Many different goals can be created with minimal coding

Goal-driven agents Different classes of agents solve problem in different ways, based on their abilities Different classes of agents solve problem in different ways, based on their abilities “Block door”: “Block door”: Strong trolls move boulders in the way Strong trolls move boulders in the way Small hobbits shovel sand into the opening Small hobbits shovel sand into the opening Each agent’s response to the goal depends on his abilities, available tools, etc. Each agent’s response to the goal depends on his abilities, available tools, etc. Goal object contains alternative recipes Goal object contains alternative recipes One goal at a time is active for each agent One goal at a time is active for each agent In more complex games, might have goal queue In more complex games, might have goal queue

A* path planning Smart path planning/locomotion using waypoints/grabpoints built into the world Smart path planning/locomotion using waypoints/grabpoints built into the world Board/card games like chess/poker are impossible to completely search, heuristics are required and search cutoffs Board/card games like chess/poker are impossible to completely search, heuristics are required and search cutoffs

flocking/formation Agents have small goals to balance that result in emergent behavior Agents have small goals to balance that result in emergent behavior Flocking: stay close, navigate toward centroid of flock, avoid collision Flocking: stay close, navigate toward centroid of flock, avoid collision Results in a ‘crowd’ behavior look Results in a ‘crowd’ behavior look Formations: flanking/center/right wing, etc. Formations: flanking/center/right wing, etc. Individuals stay evenly spaced within their group Individuals stay evenly spaced within their group Each agent chooses a position within the formation Each agent chooses a position within the formation One agent or central planner selects formation One agent or central planner selects formation Results in a more disciplined/organized look (Orcs) Results in a more disciplined/organized look (Orcs) Depends on how organized you want the agents to appear Depends on how organized you want the agents to appear

Flocking demos See Craig Reynold’s Steering behaviors: See Craig Reynold’s Steering behaviors:

“Intelligent” interaction NPCs might communicate state via language NPCs might communicate state via language E.g. Wii Fit, “All your bases belong to us” E.g. Wii Fit, “All your bases belong to us” Complete job is WAAAAY too hard Complete job is WAAAAY too hard Input: probably beyond scope of project Input: probably beyond scope of project Output: May be able to do simple state-conditional things (mocking, encouragement) Output: May be able to do simple state-conditional things (mocking, encouragement) Scripting languages can be used for rapid deployment Scripting languages can be used for rapid deployment

Other AI principles: observability Don’t let the agents have perfect knowledge: they have to operate in the environment like the players do Don’t let the agents have perfect knowledge: they have to operate in the environment like the players do Sense and remember events in their sensory horizon, memories can have a TTL Sense and remember events in their sensory horizon, memories can have a TTL Perhaps in more advanced levels, they can communicate with each other about what they know Perhaps in more advanced levels, they can communicate with each other about what they know See article on “adding stupidity to AI” See article on “adding stupidity to AI”