Round Attacker AI
Updated a year ago
Round Attacker - Action game to defeat the enemy.
Original Game
This is a game I made 3 years ago when UnityWebPlayer is present. This time I used ML-Agents and make Player moving automatically with AI.
Game specification 1. The player can move around the enemy circularly 2. The enemy changes its direction, up and down, left and right, and attacks towards upper, lower, left and right stop points 3. Players can only attack on the enemy's front, rear, left and right stop points 4. The back of the obstacle is not attacked by the enemy 5. When you take a glowing ball (recovery item), your physical strength recovers
state - Player's position parameters (x, z) - Player's HP rate (HP / max HP) - Rotation angle of Enemy - HP rate of Enemy (HP / max HP) - The position parameters (x, z) of the RecoverItem
action 0: Move to the right 1: Move to the left 2: Attack against Enemy
reward - Victory: reward = 1 - Defeat: reward = -1 - Damage Enemy: reward = 0.025 - Damaged from Enemy: reward = -0.025 - Recover HP: reward = 0.015 - When Done is False: reward = 0.005
curriculum-learning "enemy_attack_interval" is the time between enemy attacks.

Although I initially learned under the above conditions, it was not very effective as a result.
Improvement (Reducing the number of state parameters) I ceased using transform.potision as it is and classified it into five types.

I reduced the state parameter by one and changed it to learning with 8 state parameters in total.
As a result, the learning efficiency has increased