Most games that have fighting elements usually have many kinds of attack pattern. The purpose for this is to have better gameplay experience. Some games have a mechanic where the enemy can block or evade player’s attack. Using probability to make enemy dodge is really common. However, there is a is not much factor that can affect this randomness. You can however add some elements to affect this randomness such as Accuracy Stats or Agility Stats, but that's not the point for this project. Therefore, I would like to make an enemy that will dodge based on player's attack pattern. Player's attack pattern will be the factor which will affect enemy's behaviour to dodge.
When you want to implement AI in games, you have to make sure the algorithm is efficient so that player can enjoy smoother game experience. Reinforcement Learning is quite efficient, at least when comparing with Neural Networ or Deep Learning. The model itself is also fairly easy to understand compared to other AI Algorithm and the implementation is also not very difficult.
| Component | Value |
|---|---|
| Agent | Enemy |
| Environment | The game itself |
| Observation | Player’s Attack Pattern |
| Action | Enemy’s Prediction on Player’s Attack Pattern |
| Reward  |
|
| Punishment |
|
| Probability (50% Dodge Rate) | Reinforcement Learning |
|---|---|
![]() |
![]() |
To beat it, you basically need to change your attack pattern. Having multiple enemy attacking the player can be a bit tricky to deal with.
The current project has been implemented into this game.
Please do play the game and give me a feedback :D
Whole Gameplay Survey
The point of this survey is to some feedback about the game itself and the potential of this AI
Demo Survey
The point of this survey is to some feedback about Player's experience in dealing enemy with Probability and Reinforcement Learning


