このページは http://www.slideshare.net/ftgaic/applying-fuzzy-control-in-fighting-game-ai の内容を掲載しています。

掲載を希望されないスライド著者の方は、こちらよりご連絡下さい。

byftgaic

1年以上前 (2015/04/20)にアップロードinテクノロジー

These slides describe JerryMizunoAI (a.k.a. ChuMizunoAI) available in the following page:

http://...

These slides describe JerryMizunoAI (a.k.a. ChuMizunoAI) available in the following page:

http://www.ice.ci.ritsumei.ac.jp/~ftgaic/index-2h.html

- Applying Fuzzy

Control in Fighting

Game AI

Chun Yin Chu and Ruck Thawonmas

Intelligent Computer Entertainment Lab.

Graduate School of Information Science and

Engineering

Ritsumeikan University - In short…

• Applying fuzzy control in fighting game AI is able to

alleviate the “cold start” problem of k-nn prediction

technique1

• Fuzzy control is found to be more effective than crispy

rules

1: Kaito Yamamoto, Syunsuke Mizuno, Chun Yin Chu and Ruck Thawonmas, "Deduction of Fighting-

Game Countermeasures Using the k-Nearest Neighbor Algorithm and a Game Simulator," Proc. of

2014 IEEE Conference on Computational Intelligence and Games (CIG 2014), Dortmund, Germany,

pp. 437–441, Aug. 26-29, 2014. - What is Fighting Game?

Board Game

Fighting Game

Real time, fast pace

Turn-based, slow pace

Emergent research

Well researched

field - FightingICE

•First fighting game AI platform for annual competitions

•Written in Java, suitable for AI development by small team

•3 rounds in a game

•60 frame/second

•Data delayed by 15 frames

•

Imperfect information

•Previously 2 categories

•

1 Character

•

3 Characters

•Currently 1 character

http://www.ice.ci.ritsumei.ac.jp/~ftgaic/index.htm - Existing techniques:

k-nn Prediction &

Simulation1

• AI is re-trained for each game

• Use a game simulator to predict

the current game state to

counter the delay in

information

• Use k-nn for predicting the

opponent’s next attack action

(skills) among 31 possible

candidates

• Use another game simulator to

decide a counter-measure

action among a set of major

actions

1: Kaito Yamamoto, Syunsuke Mizuno, Chun Yin Chu and Ruck Thawonmas, "Deduction of Fighting-Game

Countermeasures Using the k-Nearest Neighbor Algorithm and a Game Simulator," Proc. of 2014 IEEE

Conference on Computational Intelligence and Games (CIG 2014), Dortmund, Germany, pp. 437–441,

Aug. 26-29, 2014. - Performance of

k-nn Prediction & Simulation AI

(MizunoAI)

• MizunoAI is able to defeat the champion of the 2013

competition

Score of MizunoAI vs T, the 2013 champion

• Score > 500 is considered victory in a round - Cold Start

•MizunoAI is re-trained for each game

•If there is not enough opponent action data (=at the beginning of the game)

Cannot

…

predict

and simulate!

•

No data to predict opponent’s action! The AI just keeps guarding!

•

MizunoAI is thus weak during the early stage of the fight

=> cold start - Applying Fuzzy Control

Is the number of opponent data

sufficient?

insufficient

sufficient

Fuzzy

Use kNN

Use rule-base.

prediction

Distance?

and

close

far

simulation

Fuzzy

kNN

prediction

Use close-

Use long-

range attack

range attack

simulation

…… - Fuzzy Control – Use k-nn prediction?

oppData is the number of opponent action record in the

corresponding dataset

Membership function for "sufficient data" and "insufficient data"

1

0.75

0.5

sufficient

Membership

insufficient

0.25

00

5

10

15

20

oppData (number of opponent data)

RULE 1 : IF oppData IS sufficient THEN decision IS use_knn;

RULE 2 : IF oppData IS insufficient THEN decision IS rule_base;

Singleton Defuzzification:

Probability(“use_MizunoAI”) = sufficient(oppData)

e.g. if oppData == 10, the probability of MizunoAI being

used is 0.5 - Fuzzy Control – close or far?

Only the horizontal distance of the two characters is considered

Membership function for “close distance" and “far distance”

1

0.8

Membership

0.6

0.4

0.2

00

40

80

120

160

200

240

280

320

360

distance

long-range

close-range

RULE 1 : IF distance IS close THEN decision IS close_range_attack;

RULE 2 : IF distance IS far THEN decision IS long_range_attack;

Singleton Defuzzification:

Probability(“close-range-attack”) = close-range(distance);

e.g. if distance == 60, the probability of using close-range

attack is 0.5 - Evaluation

•200 3-round games (100 games played as P1 + 100 games as P2) against:

•

MizunoAI: original k-nn prediction and simulation AI as proposed by

Yamamoto et al. (2014)

•

ChuMizunoAI_crispy: AI proposed by this paper, but replaced fuzzy control

with crispy threshold

•All AIs used 3 as the k-value for the k-nn algorithm

•All AIs used the character KFM and fought on FightingICE v.1.02

VS ChuMizunoAI_crispy

VS MizunoAI

Threshold: oppData = 10, distance =

Round

Round

Round 60

Round

Round

Round

1

2

3

1

2

3

Average

542

502

514

Average

647

572

542

SD

104

125

128

SD

129

166

146

Results

174 wins

71 wins

56 wins

Results

129 wins

67 wins

83 wins

26 loses

110 draws 119 draws

3 draws

70 draws

52 draws

19 loses

68 loses

63 loses

65 loses

25 loses

Fuzzy rule-base outperforms

MizunoAI performed poorly due to cold start

crispy rules

•Better performance than the original MizunoAI

•Fuzzy control fared better than crispy rule - Video:

ChuMizunoAI vs MizunoAI

P1: ChuMizunoAI

P2: MizunoAI - Fighting Game AI Competition

2015

Fighting Game AI Competition will be held at CIG 2015

Midterm Deadline: 7 June 2015

Final Deadline: 16 August 2015

Please refer to http://www.ice.ci.ritsumei.ac.jp/~ftgaic/ - Thank you for your kind

attention

Questions are welcome - Appendix 1 – Fuzzy Rule-Based Move Sets

to-air

STAN

TA D

N _F_D_D

_F_D

FA

_D

STAN

S

D

TAN _D_D

_D

F_F

_D

B

F_F

CROUCH_FB

OU

AIR

AI _D

_ _D

_ F_FA

F_F

STAN

TA D

N _F_D

_F_ _DFB

_D

AI

A R_D_D

_D

B

_D _

B BB

B

close

los , to

t -air

far

f ,

ar to-air

close

far

STAN

TA D

N _B

STAN

S

D

TAN _D_D

_D

F_F

_D

C/A

F_F

STAN

S

D

TAN _D

D

_

_D DB

D _B

B

A

STA

S

N

TA D_D

D

_D

_D

B

_D _BB

_B

THROW

THR

_A

AI

A R_D_D

_D

B

_D _

B BB

B

close,

e to

t -grou

-g

nd

far,

ar to-gro

to-g und

to-ground - Appendix 2 – On Singleton Defuzzification

• All fuzzy controls use singleton defuzzication

• The membership values are directly used as

probabilities, which is then used to derive a single

defuzzified output

Membership function for "sufficient data" and "insufficient data"

1

0.75

0.5

sufficient

Membership

insufficient

0.25

00

5

10

15

20

oppData

oppData = 6

oppData = 13

P(“use_mizunoAI”) : P(“rule_base”) = 1 : 9 P(“use_mizunoAI”) : P(“rule_base”) = 8 : 2 - Appendix 3 – Evaluation using

ChuMizunoAI_crispy with different parameters

• 20 3-round games for each set of parameters (10 as P1, 10 as

P2)

• All against ChuMizunoAI_crispy

Th

• resAhllo fld

ig: uorpp

es D

a a

r tea = 5

cor , d

recistan

ted ce =

to nearest int

Th eg

res e

h r

old: oppData = 5, distance =

Round 40 Round

Round

Round 60 Round

Round

1

2

3

1

2

3

Average

518

517

510

Average

549

507

501

SD

57

47

62

SD

90

78

97

Results

12 wins

8 wins

7 wins

Results

14 wins

8 wins

9 wins

1 draw

7 draws

6 draws

1 draw

5 draws

5 draws

7 loses

5 loses

7 loses

5 loses

7 loses

6 loses

Threshold: oppData = 5, distance =

Round 80 Round

Round

1

2

3

Average

542

523

544

SD

101

93

104

Results

14 wins

8 wins

9 wins

6 loses

5 draws

6 draws

7 loses

5 loses - Appendix 3 – Evaluation using

ChuMizunoAI_crispy with different parameters

Threshold: oppData = 10, distance =

Threshold: oppData = 10, distance =

Round 40 Round

Round

Round 80 Round

Round

1

2

3

1

2

3

Average

540

517

518

Average

546

506

511

SD

78

64

78

SD

97

60

85

Results

14 wins

6 wins

8 wins

Results

12 wins

8 wins

8 wins

3 draws

10 draws

10 draws

8 loses

7 draws

6 draws

3 loses

4 loses

2 loses

5 loses

6 loses - Appendix 3 – Evaluation using

ChuMizunoAI_crispy with different parameters

Threshold: oppData = 15, distance =

Threshold: oppData = 15, distance =

Round 40 Round

Round

Round 60 Round

Round

1

2

3

1

2

3

Average

517

525

502

Average

501

507

504

SD

84

39

90

SD

56

70

96

Results

12 wins

8 wins

7 wins

Results

11 wins

7 wins

7 wins

1 draws

10 draws

8 draws

9 loses

9 draws

9 draws

7 loses

2 loses

5 loses

4 loses

4 loses

Threshold: oppData = 15, distance =

Round 80 Round

Round

1

2

3

Average

517

516

528

SD

99

62

123

Results

13 wins

11 wins

8 wins

7 loses

4 draws

6 draws

5 loses

6 loses