+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Applying fuzzy control in fighting game ai
1. 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
2. In short…
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.
• 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
3. What is Fighting Game?
Board Game
Turn-based, slow pace
Well researched
Fighting Game
Real time, fast pace
Emergent research field
4. 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
5. 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.
6. Performance of
k-nn Prediction & Simulation AI
(MizunoAI)
• MizunoAI is able to defeat the champion of the 2013
competition
• Score > 500 is considered victory in a round
Score of MizunoAI vs T, the 2013 champion
7. Cold Start
• MizunoAI is re-trained for each game
• If there is not enough opponent action data (=at the beginning of the game)…
• 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
Cannot predict
and simulate!
8. Applying Fuzzy Control
Is the number of opponent data sufficient?
sufficient
Use kNN
prediction and
simulation
kNN
prediction
simulation
……
Use rule-base.
Distance?
insufficient
close far
Use close-
range attack
Use long-range
attack
Fuzzy
Fuzzy
9. Fuzzy Control – Use k-nn prediction?
Singleton Defuzzification:
Probability(“use_MizunoAI”) = sufficient(oppData)
e.g. if oppData == 10, the probability of MizunoAI being used is 0.5
0
0.25
0.5
0.75
1
0 5 10 15 20
Membership
oppData (number of opponent data)
Membership function for "sufficient data" and
"insufficient data"
insufficient
sufficient
RULE 1 : IF oppData IS sufficient THEN decision IS use_knn;
RULE 2 : IF oppData IS insufficient THEN decision IS rule_base;
oppData is the number of opponent action record in the
corresponding dataset
10. Fuzzy Control – close or far?
Only the horizontal distance of the two characters is considered
Singleton Defuzzification:
Probability(“close-range-attack”) = close-range(distance);
e.g. if distance == 60, the probability of using close-range attack is 0.5
RULE 1 : IF distance IS close THEN decision IS close_range_attack;
RULE 2 : IF distance IS far THEN decision IS long_range_attack;
0
0.2
0.4
0.6
0.8
1
0 40 80 120 160 200 240 280 320 360
Membership
distance
Membership function for “close distance" and “far distance”
close-range long-range
11. 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
Round 1 Round 2 Round 3
Average 542 502 514
SD 104 125 128
Results 129 wins
3 draws
68 loses
67 wins
70 draws
63 loses
83 wins
52 draws
65 loses
VS ChuMizunoAI_crispy
Threshold: oppData = 10, distance = 60
Round 1 Round 2 Round 3
Average 647 572 542
SD 129 166 146
Results 174 wins
26 loses
71 wins
110 draws
19 loses
56 wins
119 draws
25 loses
VS MizunoAI
• Better performance than the original MizunoAI
• Fuzzy control fared better than crispy rule
MizunoAI performed poorly due to cold start
Fuzzy rule-base outperforms
crispy rules
13. 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/
16. 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
0
0.25
0.5
0.75
1
0 5 10 15 20
Membership
oppData
Membership function for "sufficient data" and "insufficient
data"
insufficient
sufficient
oppData = 6
P(“use_mizunoAI”) : P(“rule_base”) = 1 : 9
oppData = 13
P(“use_mizunoAI”) : P(“rule_base”) = 8 : 2
17. Appendix 3 – Evaluation using
ChuMizunoAI_crispy with different parameters
Round 1 Round 2 Round 3
Average 518 517 510
SD 57 47 62
Results 12 wins
1 draw
7 loses
8 wins
7 draws
5 loses
7 wins
6 draws
7 loses
Threshold: oppData = 5, distance = 40
• 20 3-round games for each set of parameters (10 as P1, 10 as P2)
• All against ChuMizunoAI_crispy
• All figures are corrected to nearest integer
Round 1 Round 2 Round 3
Average 549 507 501
SD 90 78 97
Results 14 wins
1 draw
5 loses
8 wins
5 draws
7 loses
9 wins
5 draws
6 loses
Threshold: oppData = 5, distance = 60
Round 1 Round 2 Round 3
Average 542 523 544
SD 101 93 104
Results 14 wins
6 loses
8 wins
5 draws
7 loses
9 wins
6 draws
5 loses
Threshold: oppData = 5, distance = 80
18. Appendix 3 – Evaluation using
ChuMizunoAI_crispy with different parameters
Round 1 Round 2 Round 3
Average 540 517 518
SD 78 64 78
Results 14 wins
3 draws
3 loses
6 wins
10 draws
4 loses
8 wins
10 draws
2 loses
Threshold: oppData = 10, distance = 40
Round 1 Round 2 Round 3
Average 546 506 511
SD 97 60 85
Results 12 wins
8 loses
8 wins
7 draws
5 loses
8 wins
6 draws
6 loses
Threshold: oppData = 10, distance = 80
19. Appendix 3 – Evaluation using
ChuMizunoAI_crispy with different parameters
Round 1 Round 2 Round 3
Average 517 525 502
SD 84 39 90
Results 12 wins
1 draws
7 loses
8 wins
10 draws
2 loses
7 wins
8 draws
5 loses
Threshold: oppData = 15, distance = 40
Round 1 Round 2 Round 3
Average 501 507 504
SD 56 70 96
Results 11 wins
9 loses
7 wins
9 draws
4 loses
7 wins
9 draws
4 loses
Threshold: oppData = 15, distance = 60
Round 1 Round 2 Round 3
Average 517 516 528
SD 99 62 123
Results 13 wins
7 loses
11 wins
4 draws
5 loses
8 wins
6 draws
6 loses
Threshold: oppData = 15, distance = 80
Editor's Notes
k in the title is made italic
AI -> MizunoAI
k in the title is made italic
Java code was removed