• Tidak ada hasil yang ditemukan

Index of /Kuliah2016-2017/KecerdasanBuatanUntukGame

N/A
N/A
Protected

Academic year: 2017

Membagikan "Index of /Kuliah2016-2017/KecerdasanBuatanUntukGame"

Copied!
17
0
0

Teks penuh

(1)

Artificial Intelligence in

Game Design

(2)

Randomness Inside State

Randomness in actions taken by NPC

– Randomness inside update method

– Can depend on current state

Confident Angry Frightened

Attack Left 40% 60% 30%

Attack Right

40% 35% 20%

(3)

Randomness Inside State

Randomness in Initial Setup

– Randomness in enter method

– Example: choice of weapon in Fight state

(4)

Randomness in Transitions

Same current state + same stimuli

= one of several possible next states

– Possibly including current state

Performing different tasks at random

Patrol in front of Door

Player visible

Player visible

Guard Door and Shout for Help

Chase Player

(5)

Random Behavior Timeouts

Continue strong emotional behavior for random

number of steps

Wander

Predator seen

Flee

Predator not seen

10%

Predator seen

Predator not seen

(6)

Unpredictability of World

• Small chance of “unexpected” occurrence

– Adds “newness” to game even after multiple plays – Adds to “realism” of world

Reload

Finished reloading

Aim Fire

Target in sights 98%

Gun Jam

Target in sights 2%

Normal case

Unexpected case

(7)

Randomness in Emotional States

Confident Angry

Frightened Player HP < 10

60%

Small hit by player 25%

My HP < 10 50% Heavy hit by me

30%

Heavy hit by player

30%

• Emotional transitions less predictable

• Effect of “delayed reaction”

My HP < 10 50% Small hit by player

75% Player HP < 10 40%

Heavy hit by player

70%

(8)

Probabilities and Personality

• NPCs with probabilities can give illusion of personalities

• Differences must be large enough for player to notice in behavior

Confident Angry

Frightened Player HP < 10

20%

Small hit by player

90%

My HP < 10

20% Heavy hit by me

30%

Heavy hit by player

30%

My HP < 10

80% Small hit by player

10% Player HP < 10

80%

Heavy hit by player

70%

Heavy hit by me 70%

Orc with anger

(9)

Dynamic Probabilities

Likelihood of transition depends on something else

– More realistic (but not completely predictable)

– Can give player clues about state of NPC

Firing

Player not firing

Reload

1- % of bullets left % of bullets left

Patrol in front of Door

Player visible

Guard Door and Shout for Help

Chase Player

(10)

Emergent Group Behavior

Each NPC in group can choose random behavior

– Can appear to “cooperate”

– Half of group fires immediately giving “cover” to rest – If player shoots firing players, rest will have time to

reach cover

Patrol

Player visible

Fire

Take Cover

50 %

50 %

(11)

Emergent Group Behavior

Potential problem:

Possibility all in group can choose same action

– All either shoot or take cover

– No longer looks intelligent

Can base probabilities on actions others take

Patrol

Player visible

Fire

Take Cover

% of other players firing

(12)

“Markov” State Machines

Tool for decision making about states

– Give states a “measure” describing how good state is – Move to state with best measure

Key: Measure changes as result of events

– Possibly returns to original values if no events occur

(13)

“Markov” State Machines

• Example: Guard choosing cover

• Different cover has different “safety” measures

• Firing from cover makes it less safe (player will start shooting at that cover)

Represent safety as vector of

values

1.0

1.5

0.5

trees

wall

(14)

“Markov” State Machines

Assign

transition “matrix”

to each action

Defines how each state affected by action

– Multiplier < 1 = worse

– Multiplier > 1 = better

Example: fire from trees

– Trees less safe

– Other positions marginally safer (player not concentrating on them)

0.1

1.2

(15)

“Markov” State Machines

• “Multiply” current vector by

matrix to get new values

• Note: real matrix multiplication requires 2D transition matrix

0.1

1.8

0.6 1.0

1.5

0.5

0.1

1.2

1.2

=

0.1 0 0

0 1.2 0

(16)

“Markov” State Machines

Further events modify values

Example: Now fire from behind wall

1.2

0.2

1.2 0.1

1.8

0.6

0.12

0.9

0.72

(17)

“Markov” State Machines

• Note “total safety” (as sum of values)

decreasing

3

2.5

1.74…

– May be plausible (all cover becoming less safe)

– Can normalize if necessary

Can gradually increase

values over time

– Usually result of

time/turns without event

– Example: player leaves area

1.1

1.1

1.1 0.12

0.9

0.72

0.132

0.99

0.792

Referensi

Dokumen terkait

[r]

Subjek penelitian ini adalah mahasiswa Program Studi Pendidikan Fisika universitas Muhammadiyah Purworejo yang berjumlah 24 orang mahasiswa semester 3 TA 2014/2015..

Pb-IIP was synthesized through 4 reaction stages (Scheme 1), namely: 1) grafting of chloroacetic on chitosan (CMC), 2) adsorption of Pb(II) ion on CMC (CMC-Pb), 3) Cross-linking

menyatakan dengan sesungguhnya bahwa karya tulis ilmiah yang berjudul : “ Aplikasi Konsentrasi Bubur California dalam Biocoating terhadap Tingkat Serangan Busuk Buah

ATAS NAMA TERDAKWA KAMALUDIN Alias JEFRI Alias ABDUL HAMID Alias GILANG RIDHO.. KETUA MAHKAMAH AGUNG REPUBLIK

Sub Kompetensi : Mahasiswa dapat memahami konsep komponen simetris dan penggunaannya pada analisis sistem tenaga listrik. Indikator Pencapaian Kompetensi : Mahasiswa

menyatakan dengan sesungguhnya bahwa karya tulis ilmiah yang berjudul : “ Aplikasi Konsentrasi Bubur California dalam Biocoating terhadap Tingkat Serangan Busuk Buah

Pengantar materi tentang fenomena gangguan asimetris, filosopi gangguan asimetris, gangguan tunggal dari saluran ke tanah, gangguan antar saluran pada generator tak