game ai versus ai: an introduction to ai game programming

27
Game AI versus AI: An Introduction to AI Game Programming Héctor Muñoz-Avila

Upload: manning

Post on 23-Feb-2016

91 views

Category:

Documents


2 download

DESCRIPTION

Game AI versus AI: An Introduction to AI Game Programming. Héctor Muñoz-Avila. My General Area of Interest. Research on AI Techniques: case-based reasoning (CBR), automated planning , and machine learning. Correctness/Expressiveness of learned constructs. Theory Systems Teaching. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Game AI versus AI: An Introduction to AI Game Programming

Game AI versus AI: An Introduction to AI Game Programming

Héctor Muñoz-Avila

Page 2: Game AI versus AI: An Introduction to AI Game Programming

My General Area of Interest Research on AI Techniques: case-based reasoning

(CBR), automated planning, and machine learning

Theory

Systems

Teaching

Complexity of case reuse

Correctness/Expressiveness of learned constructs

Framework for analysis of case reuse & Retrieval

Learning hierarchical knowledge

Continuous Problem solving

AI Game Programming

Intelligent Decision Support Systems

plan adaptation

Reinforcement Learning.

Goal-Driven Autonomy

Page 3: Game AI versus AI: An Introduction to AI Game Programming

My General Area of Interest Research on AI Techniques: case-based reasoning

(CBR), automated planning, and machine learning

Theory

Systems

Teaching

Complexity of case reuse

Correctness/Expressiveness of learned constructs

Framework for analysis of case reuse & Retrieval

Learning hierarchical knowledge

Continuous Problem solving

AI Game Programming

Intelligent Decision Support Systems

plan adaptation

Reinforcement Learning.

Goal-Driven Autonomy

Page 4: Game AI versus AI: An Introduction to AI Game Programming

Game AIDo you know what is attack Kung-Fu style?

http://www.youtube.com/watch?v=-aTbfxwdYQo

Page 5: Game AI versus AI: An Introduction to AI Game Programming

Half-Life: Gordon Freeman’s First Encounter with the Marines

Do they attack Kung-Fu style?

Page 6: Game AI versus AI: An Introduction to AI Game Programming

Half-Life Kung-Fu Attackhttp://www.youtube.com/watch?v=rZUe9FSRnd8&feature=autoplay&list=PLD0067F4CFAE431A0&lf=results_main&playnext=1

• Actually no more than 2 marines are attacking at any time

• The other marines take cover, move around etc.

• When one of the attacking marines run out of ammo, is wounded, dies, etc., one of the others take his place• Some reactions are hard-coded and scenario-dependent

Page 7: Game AI versus AI: An Introduction to AI Game Programming

Game AI

• Term refers to the algorithms controlling:– The computer-controlled units/opponents– Gaming conditions (e.g., weather)– Path finding

• Attack Kung-Fu style is an example of game AI for the computer opponent

• Programming intentional mistakes is also part of controlling the computer opponent “AI”

Page 8: Game AI versus AI: An Introduction to AI Game Programming

Programming “Good” AI Opponent(according to Lars Liden; Ch. 2; AIWS1)

• Enemies move before firing• Make mob/enemy visible • Announce enemy presence by sound or other means

http://www.youtube.com/watch?v=vL8YfqyU4Fo&feature=related

Page 9: Game AI versus AI: An Introduction to AI Game Programming

Challenge• Games have increasingly larger content

– E.g., Elders Scrolls V: Skyrim: It will take an avatar months to walk the complete game environment

– “dirty” little secret: frequently they cheat!• Any fans of the Civilization game series?

• Making good Game AI is difficult– Players are sometimes willing to forgive obvious short-

comings (because of “Lusory Attitude”)• In non-gaming context (e.g., simulation for military

training)– Users will loose confidence in the simulation– Requires high-fidelity environment

• including AI of NPCs

Page 10: Game AI versus AI: An Introduction to AI Game Programming

What is AI?

Systems that think like humans

Systems that think rationally

Systems that act like humans

Systems that act rationally

Categories for definitions of AI

Page 11: Game AI versus AI: An Introduction to AI Game Programming

The Turing Test: Preliminaries

• Designed by Alan Turing (1950)

• The Turing test provides a satisfactory operational definition of AI

• It’s a behavioral test (i.e., test if a system acts like a human)

• Problem: it is difficult to make a mathematical analysis of it

Page 12: Game AI versus AI: An Introduction to AI Game Programming

The Turing Test

The Turing Test: a computer is programmed well enough to have a conversation with an interrogator (for example through a computer terminal) and passes the test if the interrogator cannot discern if there is a computer or a human at the other end

machine? ? machine

Page 13: Game AI versus AI: An Introduction to AI Game Programming

The Turing Test vs. AI Fields

For a program to pass the Turing Test, it needs to pass the exhibit the following capabilities:

• Natural language processing

• Knowledge representation

• Automated reasoning

• Machine learning

Page 14: Game AI versus AI: An Introduction to AI Game Programming

Loebner Prize

• Each year (since 1994) a competition is made to see if a computer passes the Turing Test

• The first program to pass it will receive 100k

• Controversial: Minsky offer 100 if anyone finish it

• Still, it is interesting to observe capabilities

• Machines seems to have come close to fulfill Turing’s prediction (5 minutes)

Page 15: Game AI versus AI: An Introduction to AI Game Programming

Loebner Prize (II)ENTRANT: Welcome judge 4JUDGE: Hello. What's the weather outside?ENTRANT: I haven't been outside much today. I am fond of asparagus myself.JUDGE: How old are you?ENTRANT: I'm about 30.JUDGE: About?ENTRANT: I can talk about Star Trek.JUDGE: No let's talk about you. Exactly how old are you?ENTRANT: Right you are batman.

Main drawbacks:

• Yes/No test• No incremental goals• …

Page 16: Game AI versus AI: An Introduction to AI Game Programming

Other Predictions from Turing

• Predicted that by the year 2000 a computer will have 30% chances to fool a person for 5 minutes

• Anticipated the major arguments against AI:

• The mathematical objection to AI

• Argument from Informality

Page 17: Game AI versus AI: An Introduction to AI Game Programming

The Mathematical Objection to AIThe Halting Problem

• Can we write a program in a language L (i.e., java), that recognizes if any program written in that language ends with a given input?

• Answer: No (Turing, 1940’s: the set {(P,I) : P will stop with an input I} is not Turing-computable)

• Proof by contradiction (using a Universal Turing Machine -CSC318: Automata Theory-)

Page 18: Game AI versus AI: An Introduction to AI Game Programming

The Mathematical Objection to AI

• Argument against AI: a human can determine if a program ends or not

• Thus, computers machines are inferior as humans

• Argument against this argument:

If the brain is a deterministic device then it is a formal system like a computer is (though more complicated)

If the brain has some non deterministic aspects, then we can incorporate devices that has non deterministic behavior

Page 19: Game AI versus AI: An Introduction to AI Game Programming

Point of View in Our Course• These discussions refer to pros and cons of constructing a

machine that behaves like a human

• A wide range of techniques have been developed as a result of the interest in AI

• In practice, some of these techniques have been effectively used to enhance computer games

• Studying these successfully applied techniques for games and promising directions is one of the two aspects to be covered in this course (the other aspect to be covered in this course is how

Game AI is created nowadays)• We leave the discussion of whether a Game exhibit a human-

like behavior or not to cognitive scientist or philosophers

Page 20: Game AI versus AI: An Introduction to AI Game Programming

AI: Genesis

• Logical reasoning calculus was conceived (Leibniz, 17 century)

• Leibiz’ motivation: solve intellectual arguments by calculation

• Boolean logic (Boole, 1847)

• Predicate Logic (Frege, 1879): Begriffsschrift

• Incompleteness Theorem (Goedel, 1940’s)

Page 21: Game AI versus AI: An Introduction to AI Game Programming

AI: Some Historical Highlights

• Turing’s article about what machines can do

• Term AI is coined at the Dartmouth conference (1956)

• General Problem Solver (Newell & Simon; 1958)

• Period of great expectations

Page 22: Game AI versus AI: An Introduction to AI Game Programming

Early Stages, Great Expectations

(what they thought they could achieve)

Jenna: What were you just thinking?

Data: In that particular moment, I was reconfiguring the warp field parameters, analyzing the collected works of Charles Dickens, calculating the maximum pressure I could safely apply to your lips, considering a new food supplement for Spot...

Jenna: I'm glad I was in there somewhere.

(from In Theory episode)

Page 23: Game AI versus AI: An Introduction to AI Game Programming

AI: Some Historical Highlights (cont’d)

• Perceptrons: limits to neural networks (Minksy and Papert; 1969)

• Knowledge-based systems (1970’s)

• AI becomes an industry. Early successes of Expert systems

Page 24: Game AI versus AI: An Introduction to AI Game Programming

AI: Some Historical Highlights (cont’d)

• It becomes clear that expert systems are hard to create (problem known as the Knowledge Acquisition bottle-neck)

• Renaissance of neural networks as connectionism

• 1990’s: more consolidated approaches to AI, more realistic expectations, fielded applications:

machine learning to data-miningvarious AI techniques to computer gamesprediction

Page 25: Game AI versus AI: An Introduction to AI Game Programming

Course Goal

Our goal is to understand the connections and the misconceptions from both sides

AI research

AC

B A B C A CB

CBA

BA

C

BAC

B CA

CAB

ACB

BCA

A BC

AB

CABC

Game AIas game practitioners implemented it

Page 26: Game AI versus AI: An Introduction to AI Game Programming

Some AI Topics

• Search

• Planning

• Natural language processing

• Machine learning

• Case-based reasoning

• Robotics

• Computer vision

• Neural networks

Some of which have been applied in commercial computer games

Page 27: Game AI versus AI: An Introduction to AI Game Programming

Game AI Topics

(1) Real-Time Strategy games (Luis Villegas, Dulmovits, Alexander J.)(2) Squad tactics (John Formica, Matt Mitchell, David Pennenga )(3) Scripting languages ()(4) First Person Shooters (Michael Caffrey, Shamus Field, Jon Hardy)(5) Racing games ()(6) Role Playing Games (Josh Westbrook, Ethan Harman)(7) Story line, drama ()(8) Sports Games (Daniel Phillips, Dan Ruthrauff)(9) Individual NPC behavior (Daniel Phang, Sui Ying Teoh)(10) Player Modeling ()(11) Map, World, Wall generation  ()

• You have until Tuesday next week to form groups for programming projects/presentations. Groups of 2-3 people

• First come, first serve basis. Email at: hem4