1 Artificial Intelligence in Games Class 6 Steve Rabin

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

Objectives Identify the differences between Analytical Decision Making and Intuitive Decision Making Demonstrate basic design and delivery requirements.
Presentation on Artificial Intelligence
8.3. A GENT AND D ECISION M AKING AI Agent driven AI and associated decision making techniques.
The Computer as a Tutor. With the invention of the microcomputer (now also commonly referred to as PCs or personal computers), the PC has become the tool.
Agile Route Shopper Tracker Shopperception: Using a KINECT to build real world Google Analytics.
Artificial Intelligence for Games Patrick Olivier & John Shearer
Half life 2/ Counter Strike: Source bot Charlie Cross CIS
Artificial Intelligence CGDD Artificial Intelligence Human-level intelligence - an unsolved problem AI “describes the intelligence embodied in any.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Introduction to Learning.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
Brent Dingle Marco A. Morales Texas A&M University, Spring 2002
And Just Games etc.. EVOLUTION OF COMPUTER GAMES PongOdyssey Beginning of the use of microprocessors ATARI VCS system bit.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
Chapter 12: Intelligent Systems in Business
Behavior- Based Approaches Behavior- Based Approaches.
McGraw-Hill/Irwin ©2005 The McGraw-Hill Companies, All rights reserved ©2005 The McGraw-Hill Companies, All rights reserved McGraw-Hill/Irwin.
Using Situational awareness and decision making
Learning to Think Critically pages Objectives Define thinking & reflection Identify 3 functions of the brain Describe how thinking impacts decision.
Participating actively in different kinds of decision- making and voting in order to influence public life Exploring different kinds of rights and obligations.
Artificial Intelligence in Game Design Event and Sense Management.
CSCE 552 Fall 2012 Inverse Kinematics & AI By Jijun Tang.
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.
Chapter 6 Supplement Knowledge Engineering and Acquisition Chapter 6 Supplement.
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.
Writing Workshop Writing a Persuasive Essay Assignment Prewriting Choose an Issue Write an Opinion Statement Consider Your Purpose and Audience Gather.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
Artificial Intelligence Techniques Artificial Stupidity?
AI in games Roger Crawfis/Eric Fosler-Lussier CSE 786 Game Design.
Artificial Intelligence in Game Design
SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release.
Self Management Project MGT 494 Lecture-8 1. Recap Experiential Learning and Self-Management The EIAG Model 2.
Chap. 1 GENERAL WISDOM AI Game Programming Wisdom.
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
CSCE 552 Fall 2012 Inverse Kinematics & AI By Jijun Tang.
CSCE 552 Spring 2011 Inverse Kinematics & AI By Jijun Tang.
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.
Algorithmic, Game-theoretic and Logical Foundations
Pac-Man AI using GA. Why Machine Learning in Video Games? Better player experience Agents can adapt to player Increased variety of agent behaviors Ever-changing.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Artificial Intelligence in Games
Rational Agency CSMC Introduction to Artificial Intelligence January 8, 2004.
Chapter 5.3 Artificial Intelligence: Agents, Architecture, and Techniques.
Intellectual Development from One to Three Chapter 12.
Chapter VI What should I know about the sizes and speeds of computers?
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
1 CO Games Development 1 Week 3 Game Agents 2 Gareth Bellaby.
Group Work. Why Group Work? It’s a break from lecture or regular tasks. It gives everyone a chance to contribute. It can be fun. You can learn from each.
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.
INTRODUCTION TO COGNITIVE SCIENCE NURSING INFORMATICS CHAPTER 3 1.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
CSCE 552 Fall 2012 AI By Jijun Tang. Homework 3 List of AI techniques in games you have played; Select one game and discuss how AI enhances its game play.
CSCE 552 Spring 2009 Inverse Kinematics and AI By Jijun Tang.
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.
The Game Development Process: Artificial Intelligence.
Team Member AI in an FPS and Goal Oriented Action Planning.
Artificial Intelligence: Agents, Architecture, and Techniques
CIS 488/588 Bruce R. Maxim UM-Dearborn
Artificial Intelligence and Searching
Navigation In Dynamic Environment
CIS 488/588 Bruce R. Maxim UM-Dearborn
Interaction with artificial intelligence in games
Inverse Kinematics & AI
Writing Workshop Writing a Persuasive Essay
Artificial Intelligence and Searching
Artificial Intelligence and Searching
Presentation transcript:

1 Artificial Intelligence in Games Class 6 Steve Rabin

2 Pathfinding Project Any issues? Due next week Port A* to your own game Requirement (100%) Service path requests one at a time (FIFO) Have agents show their final path with lines/arrows Bonus (+100%) Show the open and closed list in different colors Have a toggle button to watch search step-by-step

3 Reading Assignment for Next Week Chapter Waypoint Tactics 6.2 Tactical Analyses 6.3 Tactical Pathfinding 6.4 Coordinated Action

4 Game Agents

5 May act as an Opponent Ally Neutral character Continually loops through the Sense-Think-Act cycle Optional learning or remembering step

6 Sense-Think-Act Cycle: Sensing Agent can have access to perfect information of the game world May be expensive/difficult to tease out useful info Game World Information Complete terrain layout Location and state of every game object Location and state of player But isn’t this cheating???

7 Sensing: Enforcing Limitations Human limitations? Limitations such as Not knowing about unexplored areas Not seeing through walls Not knowing location or state of player Can only know about things seen, heard, or told about Must create a sensing model

8 Sensing: Human Vision Model for Agents How should we model agent vision?

9 Sensing: Human Vision Model for Agents Get a list of all objects or agents; for each: 1. Is it within the viewing distance of the agent? How far can the agent see? What does the code look like? 2. Is it within the viewing angle of the agent? What is the agent’s viewing angle? What does the code look like? 3. Is it unobscured by the environment? Most expensive test, so it is purposely last What does the code look like?

10 Sensing: Human Vision Model for Agents Enemy Player View Distance Wall

11 Sensing: Human Vision Model for Agents Is it within the viewing angle of the agent? 90° 45° 60° 30° Viewing Angle

12 Sensing: Human Vision Model for Agents Is it within the viewing angle of the agent? ° 45° 60° 30° Dot Product Viewing Angle

13 Sensing: Human Vision Model for Agents Is it unobscured by the environment? How would you do this better? How would you do this perfect?

14 Sensing: Human Vision Model for Agents

15 Sensing: Human Vision Model for Agents

16 Sensing: Human Vision Model for Agents

17 Sensing: Human Vision Model for Agents

18 Sensing: Human Vision Model for Agents

19 Sensing: Human Vision Model for Agents

20 Sensing: Human Vision Model for Agents

21 Sensing: Human Vision Model for Agents

22 Sensing: Human Vision Model for Agents

23 Sensing: Human Vision Model for Agents

24 Sensing: Human Vision Model for Agents

25 Sensing: Human Vision Model for Agents

26 DigiPen Vision Demo

27 Sensing: Human Vision Model for Agents Let's get more real Hard to see camouflaged objects Hard to see non-moving characters Hard to identify peripheral objects Hard to identify far away objects Vision should be based on head direction, not body direction

28 Sensing: Vision Model Isn’t vision more than just detecting the existence of objects? What about recognizing interesting terrain features? What would be interesting to an agent? Demo!

29 Sensing: Human Hearing Model Humans can hear sounds Can recognize sounds Knows what emits each sound Can sense volume Indicates distance of sound Can sense pitch Sounds muffled through walls have more bass Can sense location Where sound is coming from

30 Sensing: Modeling Hearing How do you model hearing efficiently? Do you model how sounds reflect off every surface? How should an agent know about sounds?

31 Sensing: Modeling Hearing Efficiently Event-based approach When sound is emitted, it alerts interested agents Use distance and zones to determine how far sound can travel

32 Sensing: Modeling Hearing Efficiently

33 Sensing: Communication Agents might talk amongst themselves! Guards might alert other guards Agents witness player location and spread the word Model sensed knowledge through communication Event-driven when agents within vicinity of each other

34 Sensing: Player Reputation (Gunslinger) Chapter 8.6 – A Dynamic Reputation System Based on Event Knowledge

35 Sensing: Player Reputation – Reputation Event Subject GroupPlayer VerbDidViolenceTo Object GroupBandit Object IndividualJoe Magnitude75 (Killed) Where50, 20, 138 (In front of Saloon) WhenHigh noon TemplateKilledBanditTemplate Reference CountKnown by 11 NPCs Reputation EffectsBandits hate player more. Lawmen like player more. Farmers like player more.

36 Sensing: Player Reputation in Fable Five opinion values are in range [-1,1] Morality [Evil, Good] Renown [Contemptible, Renowned] Scariness [Ridiculous, Scary] Agreeableness [Offensive, Agreeable] Attractiveness [Ugly, Attractive]

37 Sensing: Player Reputation in Fable Player has hero stats of 5 opinion values Player can check at any time Player has sense of self Unobserved acts have an affect on villagers Each NPC has a relative opinion Only directly witnessed acts or overheard acts Absolute opinion = hero stats + relative opinion

38 Sensing: Player Reputation in Fable Event-driven opinion deeds are posted (like Greg Alt’s article) DEED_CRIME_WEAPON_OUT DEED_CRIME_VANDALISM DEED_EXPRESSION_HEROIC_STANCE DEED_EXPRESSION_FLIRT DEED_RECEIVE_GIFT_ROMANTIC DEED_RECEIVE_GIFT_FRIENDLY...

39 Sensing: Reaction Times Agents shouldn’t see, hear, communicate instantaneously Players notice! Build in artificial reaction times Vision: ¼ to ½ second Hearing: ¼ to ½ second Communication: > 2 seconds

40 Sense-Think-Act Cycle: Thinking Sensed information gathered Must process sensed information Two primary methods Process using pre-coded expert knowledge Use search to find an optimal solution

41 Thinking: Expert Knowledge Many different systems Finite-state machines Production systems Decision trees Logical inference Encoding expert knowledge is appealing because it’s relatively easy Can ask just the right questions As simple as if-then statements Problems with expert knowledge Not very scalable

42 Thinking: Search Employs search algorithm to find an optimal or near-optimal solution A* pathfinding common use of search

43 Thinking: Machine Learning If imparting expert knowledge and search are both not reasonable/possible, then machine learning might work Examples: Reinforcement learning Neural networks Decision tree learning Not often used by game developers Why?

44 Thinking: Flip-Flopping Decisions Must prevent flip-flopping of decisions Reaction times might help keep it from happening every frame Must make a decision and stick with it Until situation changes enough Until enough time has passed Baseball example

45 Sense-Think-Act Cycle: Acting Sensing and thinking steps invisible to player Acting is how player witnesses intelligence Numerous agent actions, for example: Change locations Pick up object Play animation Play sound effect Converse with player Fire weapon

46 Acting: Showing Intelligence Adeptness and subtlety of actions impact perceived level of intelligence Enormous burden on asset generation Agent can only express intelligence in terms of vocabulary of actions Current games have huge sets of animations/assets Must use scalable solutions to make selections

47 Extra Step in Cycle: Learning and Remembering Optional 4 th step Not necessary in many games Agents don’t live long enough Game design might not desire it

48 Learning Remembering outcomes and generalizing to future situations Simplest approach: gather statistics If 80% of time player attacks from left Then expect this likely event Adapts to player behavior

49 Remembering Remember hard facts Observed states, objects, or players For example Where was the player last seen? What weapon did the player have? Where did I last see a health pack? Memories should fade Helps keep memory requirements lower Simulates poor, imprecise, selective human memory

50 Remembering within the World All memory doesn’t need to be stored in the agent – can be stored in the world For example: Agents get slaughtered in a certain area Area might begin to “smell of death” Agent’s path planning will avoid the area Simulates group memory

51 Game Agent Cooperation

52 Game Agent Cooperation How might agents cooperate? With one other NPC? In a mob "kung-fu" style? In a squad? On a baseball team? As part of a 5000 person invasion?

53 Game Agent Cooperation Three interesting methods 1. Individuals communicate and arbitrate between themselves 2. Invisible manager coordinates 3. Blackboard architecture

54 Individual Communication Scalability problem Requires handshaking and arbitration Can you imagine doing this with SendMsg and OnMsg? What is necessary for optimal cooperation?

55 Manager Cooperation Agent assignment Get list of agents Assign each agent a task Task assignment Compose list of tasks Prioritize Assign tasks to best candidate Playbook cooperation Preplanned assignments based on situation Exhaustive analysis Some permutation of tasks/agents is optimal Score each permutation and pick best

56 Blackboard Architecture Complex problem is posted on a shared communication space Agents propose solutions Solutions scored and selected Continues until problem is solved Alternatively, use concept to facilitate communication and cooperation

57 Blackboard Architecture Example Units compete for missions on blackboard

58 “Blackboard” for Pathfinding

Extra 59

60 Fun Exercise: You'll need a piece of paper...

61 Geek Logik (The Book)

62 Geek Logik: Should you go to the doctor? (p88)

63 Geek Logik: Do you have a snowball's chance in hell with her? (p12)

64 Geek Logik: Is your personal grooming adequate? (p98)

65 Geek Logik: Should you join a gym? (p100)

66 Geek Logik: Vote for One (In-Class Exercise) 1. Should you go to the doctor? 2. Do you have a snowball's chance in hell with her? 3. Is your personal grooming adequate? 4. Should you join a gym?

67 Questions?