• 沒有找到結果。

Digital games design-Game AI

N/A
N/A
Protected

Academic year: 2021

Share "Digital games design-Game AI"

Copied!
30
0
0

加載中.... (立即查看全文)

全文

(1)

數位遊戲設計

DIGITAL GAMES DESIGN

Week14 21/May/2008 Instructor: I-Hsien Ting

(2)

AI for Games

 What is Game AI  Focusing on the NPC AI  Game AI examples Game AI types  Techniques

FSM (Finite State Machine) Fuzzy Logic

Decision Tree

Genetic Algorithm

Artificial Neural Networks

(3)

The 2007 Game AI Award

-Half life 2 (顫慄時空 2)

1. Valve has taken NPC interaction to the next-level

with this game.

2. The combine soldiers are appear very effective at

coordinating to assault the player.

 The AI technology behind the squad behaviors has been maturing well since the original Half-Life, even if this episode didn’t show it off as much as previous games.  3. The game features an impressive variety of

characters

including zombies, robotic dogs and mechanical striders,

etc.

 Each of them requires a custom AI, but they all tie into the story very well and work together to improve the player’s experience.

(4)
(5)

AI?? An AI Test of Half-Life

2

(6)

How to define Game AI

 Pac Man

Game AI? Yes! No!

(7)

The definition of game AI

 Paths Finding and Collision Detection

sometimes also have been included into game AI

 Broad definition of game AI

Deterministic (定性) Weak AI

Narrow definition of game AI

Nondeterministic (非定性) Strong AI

(8)

Weak AI and Strong AI

Weak AI

 Path finding

 A* Path finding

 Collision Detection

 Finite state machine (FSM;有限狀態機)

 If ~then rules

 Fuzzy Logic  Strong AI

 Decision Tree, Neural Network, Genetic Algorithm, Probabilistic Method, Reinforcement Learning…

 Behavior Cloning

 Artificial Life

(9)

Artificial Life

(10)

Artificial Life

 Genetic Evolution

http://www.generation5.org/jdk/demos/dictyAppl et.html

(11)
(12)
(13)

Reinforcement Learning

(14)
(15)
(16)

Commercial Game AI

 What’s Different

Normally more than one opponent: NPC teams Some NPC’s are opponents and others are there

to support the player

 Rationality

How rational is it for a weaker NPC to attack a

stronger player head-on

Believability is a major concern

NPC’s should challenge the player, but not be

(17)

Visibility

 Additional intelligence adds complexity

 Only useful if it’s visible to the player

Player should be able to explain AI behavior

 Simpler methods are often preferred

 Goal: give the impression of intelligent behavior

(18)

AI Wish List

 AI should be intelligent, but flawed: make the AI as intelligent as possible and then dumb it down.

The AI should have no blatant flaws:

No “golden path” to defeat the AI every time in the

same way

 AI Should not look plain dumb or fail miserable in any situation

AI should be efficient

 Real-time reactions

 AI normally gets no more than 20% of the CPU time

AI should be configurable by game designer or

(19)

Dumbing Down

 Make NPC less accurate (e.g. in shotting)

 NPC with longer reaction times

Engaging the player only one at a time

 NPC making themselves more vulnerable by

moving around in exposed areas or changing positions often

(20)

Cheating

 Cheating is fine for the AI, but don’t get

caught. Often the easier and more efficient solution

 Sometimes, the player can be told (e.g. AI will build new units 25% faster)

Initial position of NPCs is pre-designed (e.g. traps, defense positions)

(21)
(22)
(23)
(24)

A* Path Finding

 Perform heuristic best-first search  Heuristic evaluation of node n

Distance from initial state

Estimated distance to goal state

Admissible heuristic

(25)
(26)
(27)
(28)
(29)

Collision Detection

(30)

參考文獻

相關文件

Asia, and the History of Philosophy: Racism in the Formation of the Philosophical Canon, 1780–1830, New York: State University of New York Press, 2013) 等人 的 研 究。Garfield

z Choose a delivery month that is as close as possible to, but later than, the end of the life of the hedge. z When there is no futures contract on the asset being hedged, choose

For other types of no-pay leave, IMC schools should follow the same procedures as for no-pay sick/maternity/special tuberculosis leave mentioned above; schools which have not

Suggestions to Medicine Researchers on Using ML-driven AI.. From Intelligence to Artificial Intelligence.. intelligence: thinking and

The point should then be made that such a survey is inadequate to make general statements about the school (or even young people in Hong Kong) as the sample is not large enough

The above information is for discussion and reference only and should not be treated as investment

⚫ Students should be able to create interactive user selection, such as the 2-level interdependent select list, pull down menu and click-to-expand menu. Students should be able

Shang-Yu Su, Chao-Wei Huang, and Yun-Nung Chen, “Dual Supervised Learning for Natural Language Understanding and Generation,” in Proceedings of The 57th Annual Meeting of