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.

Slides:



Advertisements
Similar presentations
Chapter 09 AI techniques in different game genres (Puzzle/Card/Shooting)
Advertisements

7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
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.
Part2 AI as Representation and Search
Adversarial Search Chapter 5.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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.
 By Ashwinkumar Ganesan CMSC 601.  Reinforcement Learning  Problem Statement  Proposed Method  Conclusions.
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.
HEX: Eiffel Style Created By: Rory Murphy Daniel Tyszka.
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 to mobile robots Slides modified from Maja Mataric’s CSCI445, USC.
Lab 3 How’d it go?.
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.
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.
Topics for Today Task planning for non-player characters Coping with player character interactions and their effect on narrative In Hamlet on the Holodeck,
Artificial Intelligence in Game Design Behavior Trees.
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.
For games. 1. Control  Controllers for robotic applications.  Robot’s sensory system provides inputs and output sends the responses to the robot’s motor.
AI in games Roger Crawfis/Eric Fosler-Lussier CSE 786 Game Design.
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.
University of Amsterdam Search, Navigate, and Actuate – Search through Game Trees Arnoud Visser 1 Game Playing Search the action space of 2 players Russell.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
1 IE 607 Heuristic Optimization Particle Swarm Optimization.
AI in Computer Gaming: The first person shooter Tyler Hulburd.
Adventure(?) Games Workshop on AI planning in games.
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.
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.
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.
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:
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.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
From NARS to a Thinking Machine Pei Wang Temple University.
Game Creation Terminology. Procedure A set of instructions that performs a specific routine when required at several different points in the game. EXAMPLE:
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
The Game Development Process: Artificial Intelligence.
CS b659: Intelligent Robotics
Problem Solving by Searching
Fundaments of Game Design
Announcements Homework 3 due today (grace period through Friday)
CIS 488/588 Bruce R. Maxim UM-Dearborn
Real-Time Motion Planning
CHAPTER I. of EVOLUTIONARY ROBOTICS Stefano Nolfi and Dario Floreano
Job for milkshape modeller
Search.
Search.
Presentation transcript:

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 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

AI alternatives 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 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) 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

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

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