๐ŸฅŠ Episode 9 ยท Advanced ยท AI

Teach It to Think
Episode 9: AI

A fighter with no brain just stands there. The AI is a set of rules that decides when to attack, block and back off. Make it beatable but not boring.

๐Ÿ‘ถ Ages 10+ โฑ๏ธ ~1 hour ๐ŸฅŠ MUGEN โœ“ Free workshop
๐Ÿค– AI rules ๐Ÿ“ Distance ๐Ÿ›ก๏ธ Blocking โš–๏ธ Difficulty
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress 0 / 4 steps
Build it in our MUGEN Studio too: set up a fighter, add sprites and poses, place hitboxes and export a real fighter folder in the browser, with no install. Open the MUGEN Mod Studio →
๐Ÿ”ฅ
Ember says: good AI is good rules, not magic. Decide what the fighter should do at close, mid and far range, and you are most of the way there.
1
๐Ÿค–
How MUGEN AI Works
Special commands
Active
๐ŸŽฏ
Goal for this step

Understand that AI is your own code deciding.

  • 1When the computer controls a fighter, the engine lets your commands fire by themselves.
  • 2You write AI rules that use the same commands a player would.
  • 3The AILevel value tells you how hard the CPU is set to play.
โœ๏ธ
Fill in the Blanks
+15 XP
The difficulty of the CPU is read from .
๐Ÿง 
Knowledge Check
+15 XP
What does MUGEN AI actually use?
AThe same commands a player uses, fired by your rules
BA hidden neural network
CThe internet
2
๐Ÿ“
React to Distance
Close, mid, far
Locked
๐ŸŽฏ
Goal for this step

Decide behaviour by how far the enemy is.

  • 1Find the distance between the fighters each moment.
  • 2Far: walk forward. Mid: approach or poke. Close: attack or block.
  • 3Three ranges make an AI that reads well.
โœ๏ธ
Fill in the Blanks
+15 XP
A simple AI thinks in three ranges: far, mid and .
๐Ÿง 
Knowledge Check
+15 XP
A simple, readable AI divides the fight into how many ranges?
AThree
BTwenty
CNone
3
๐Ÿ›ก๏ธ
Block and Punish
Not just attacking
Locked
๐ŸŽฏ
Goal for this step

Make the AI block sometimes.

  • 1An AI that only attacks is easy to beat.
  • 2Block when the enemy is attacking, then attack back when they stop.
  • 3A little randomness makes it feel alive, not robotic.
โœ๏ธ
Fill in the Blanks
+15 XP
An AI should as well as attack.
๐Ÿง 
Knowledge Check
+15 XP
Why should an AI sometimes block?
AAn AI that only attacks is too easy to beat
BBlocking looks nice
CIt is required
4
โš–๏ธ
Balance the Difficulty
Fun, not unfair
Locked
๐ŸŽฏ
Goal for this step

Tune the AI so it is beatable.

  • 1A perfect AI is no fun. Leave gaps.
  • 2Use AILevel so a hard setting acts more often than an easy one.
  • 3Play against it five times and see if you ever lose. Adjust.
โœ๏ธ
Fill in the Blanks
+15 XP
A perfect AI that never misses is fun to fight.
๐Ÿง 
Knowledge Check
+15 XP
What is the goal of AI difficulty?
ABeatable but interesting
BImpossible to beat
CNever attack
๐ŸŽ‰โœจ๐Ÿ†๐ŸŽ‰
Your Fighter Thinks!
The CPU can now fight. The last step is to put everything together into a complete game.
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
Next: Episode 10: Build the Whole Game โ†’