25
Artificial Intelligence in Computer Game • #1 What is Intelligence? • #2 Current Frontier/Challenges/Examples • #3 Which method do computer think? • #4 General Problem in AI • #5 Game AI • #6 more Game AI Examples

Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Embed Size (px)

Citation preview

Page 1: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Artificial Intelligence in Computer Game

• #1 What is Intelligence?

• #2 Current Frontier/Challenges/Examples

• #3 Which method do computer think?

• #4 General Problem in AI

• #5 Game AI

• #6 more Game AI Examples

Page 2: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#1 What is Intelligence ?Intelligence:

— “the capacity to learn and solve problems”

(Webster dictionary)

— the ability to think and act rationally

Goal in Artificial Intelligence:

— build and understand intelligent systems/agents

— synergy between• philosophy, psychology, and cognitive science

• computer science and engineering

• mathematics and physicssource: Thorsten Joachims [[email protected]],.

Page 3: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

What’s involved in Intelligence?A) Ability to interact with the real world

— to perceive, understand, and act

— speech recognition, understanding, and synthesis

— image understanding (computer vision)

B) Reasoning and Planning

— modelling the external world

— problem solving, planning, and decision making

— ability to deal with unexpected problems, uncertainties

C) Learning and Adaptation

— we are continuously learning and adapting

Also: we want systems that adapt to us!

— Major thrust of industry research.

Page 4: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

What is Artificial Intelligence ?Artificial Intelligence [AI] ปั�ญญาปัระดิ�ษฐ์� Rich and Knight: the study of how to make computers do

things which, at the moment, people do better.

Handbook of AI: the part of computer science concerned

with designing intelligent computer systems, that is,

systems that exhibit the characteristics we associate with

intelligence in human behavior – understanding

language, learning, reasoning, solving problems, etc.

Dean, Allen and Aloimonos: the design and study of the

computer programs that behave intelligently.

Russell and Norvig: the study of [rational] agents that

exist in an environment and perceive and act.

Page 5: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Goals in AIengineering goal To solve real-world

problems. Build systems that exhibit intelligent behavior.

scientific goal To understand what kind of computational mechanisms are needed for modeling intelligent behavior.

Page 6: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Classic AI Examples

• Chinese Room• Turing Test• Deep Blue• Eliza

Page 7: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Chinese Room

The Chinese Room argument comprises a thought experiment and associated arguments by John Searle (Searle 1980), who attempts to show that a symbol-processing machine like a computer can never be properly described as having a "mind" or "understanding", regardless of how intelligently it may behave.http://en.wikipedia.org/wiki/Chinese_room

"Nobody just looking at my answers can tell that I don't speak a word of Chinese," he writes.[1]

Page 8: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Turing TestInterrogator asks questions of two “people”

who are out of sight and hearing.

One is a person; the other is a machine.

• 30 minutes to ask whatever he or she wants.

• Task: to determine, only through the questions and answers

typed into a computer terminal, which is which.

• If can’t reliably distinguish the human from the computer,

then the computer is deemed intelligent.

Artificial intelligence is the enterprise of constructing an

artifact that can pass the Turing test.

http://en.wikipedia.org/wiki/Turing_test

Page 9: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Deep Blue• Feng-hsiung Hsu, Thomas

Anantharaman and Murray Campbell at Carnegie Mellon University - CMU

• Chiptest 50,000 moves per second • Chiptest Bug 500,000 moves per

second • ChipTest-M won the North American

Computer Chess Championship in 1987

• Deep Thought 0.01 was created in May 1988 720,000 moves per second

• Deep Thought 0.02 won the World Computer Chess Championship with a perfect 5-0 score in 1989.

http://en.wikipedia.org/wiki/ChipTesthttp://en.wikipedia.org/wiki/Deep_Blue_(chess_computer)

•Deep Blue 200 million positions per second

•Deep Fritz or Deep Junior ran on a personal computer containing two Intel Core 2 Duo CPUs, capable of evaluating only 8 million positions per second

Page 10: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#2 The Current FrontierDeep Blue vs. Kasparov (May, ’97)

–first match won against world-champion

–“intelligent & creative” play

–200 million board positions per second

Kasparov: “I could feel — I could smell — a

new kind of intelligence across the table.”

... still understood 99.9% of Deep Blue’s moves.

Intriguing issue: How does human cognition deal with

the combinatorics of chess?

Page 11: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Eliza

• http://www-ai.ijs.si/eliza/eliza.html• Chat Bot• ELIZA is a computer program by Joseph Weizenbaum,

designed in 1966, which parodied a Rogerian therapist, largely by rephrasing many of the patient's statements as questions and posing them to the patient. Thus, for example, the response to "My head hurts" might be "Why do you say your head hurts?" The response to "My mother hates me" might be "Who else in your family hates you?" ELIZA was named after Eliza Doolittle, a working-class character in George Bernard Shaw's play Pygmalion, who is taught to speak with an upper class accent.[1]

Page 12: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Eliza• http://en.wikipedia.org/wiki/Image:GNU_Emacs_ELIZA_example.png

Page 13: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Rules and Learning

Ivan Palovhttp://animals.howstuffworks.com/pets/dog-training.htm

Learning rules means adaption ..

get reward/punishment

(eg. In behavioral psychology

give reward – dog trainning experiment)

Page 14: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#3 Which method do computer think ? : Structure

The brain

— a neuron is the basic processing unit, >100 Billion neurons

— many more synapses connect the neurons

— cycle time: EEG: Theta 4-8 Hz Alpha 8-12Hz Gamma 26-70Hz

Computers

— 55Million or more transistors per CPU

— supercomputer: hundreds of CPUs

— cycle times: 3GHz

Page 15: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Which method do computer think ? : Algorithm & Experience

The brain

— Experience Induction/ Inductive Reasoning (Learning from experience)

Computers

— Algorithm Fix method

— Algorithm Induction (Learning from data)

Page 16: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Game Play / Search Tree

Example of Search Tree

— Possible Movestart

goal

x xx

x

x x

OO

O xO

xO

xx

xoo

o

Page 17: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Heuristic Search

Heuristic

— heuristic is a function h(x) defined on node of search tree

Search will expand the lowest value for g(n)+h(n)

g(n) = (exact) cost of the path from the initial state to the current node

h(n) = never over estimates the cost of reaching the goal

Examples: Solved n-Puzzle, Rubik

Page 18: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#4 Problem in AI

Data Fitting / Data Prediction Problem

— future, who knows? eg. stock market

time

value

overfit

underfit

goodfit

Page 19: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Problem in AI

Classification Problem

Page 20: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Problem in AI

Optimization Problem

— Traveling Salesman Problem [TSP]

— Findout a new design to reduce cost, energy, efficiency ..

Page 21: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#5 Game AI

— Path Solver

— Expert System

— Finite Stage Machine FSM

Page 22: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Path FindingPath Solver

— Automatic movement in map

http://theory.stanford.edu/~amitp/GameProgramming/AStarComparison.html

Page 23: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Finite Stage Machine [FSM]

— Given Rulesตื่��น

ตื่�อสู้�

หลั�บ หน�

ตื่ายเกิ�ดใหม่�

มองเห็�นผู้��เล่�น?

มองไม�เห็�นผู้��เล่�น?

ม�โควต้�า?

รอ?

เข้�าใกล่�?

พล่#งห็มดิ?พล่#งล่ดิล่ง?

พล่#งห็มดิ?

มองไม�เห็�นผู้��เล่�น?

Drop Items..

พล่#งเพ�$ม?

Page 24: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

#6 More Game AI examplesRPGs

— Scripting (eg. Phython, Ruby )

— Rules based

— Agent, Bots

Page 25: Artificial Intelligence in Computer Game #1 What is Intelligence? #2 Current Frontier/Challenges/Examples #3 Which method do computer think? #4 General

Ethics in Game AI ?Should AI cheat ?

— Cheat Declaration:

Know opponent's data

Know systems data

— no cheat = hard code

— cheat = easier code base on global data

Game purpose is for fun. even AI cheating and people who play game still feel fun. do it.