Air Hockey AI
A downloadable project
Unity's ML-Agents (https://github.com/Unity-Technologies/ml-agents) is not yet supported for WebGL builds, so instead these are videos that show the results of training an AI striker in the Air Hockey game.
The red striker is player-controlled, and the green striker is AI controlled.
The AI's brain was trained against itself using Unity's ML-Agents.
In AH_brain1, the AI striker can be seen defending its goal, such as at 0:25, 1:35, and 1:45, even anticipating where the puck is going and blocking it in advance. It also makes attempts to score, as at 0:52.
Attempting to score can be seen more clearly in AH_brain2, in which the AI striker actually beats the player-controlled striker. The AI striker continuously tries to push the puck towards the player's goal and away from its own.
In AH_doubleAI, both the strikers are AI controlled, and share the same brain. The video shows them playing each other.
Overall, it is difficult to say whether the AI striker is intentionally defending and attacking, but it can be said with certainty that it does follow the puck and makes and effort to hit it. With more observations given to the AI striker and a better reward system, it is likely that AI striker will be able to make more intelligent decisions.
Link to scripts:
Link to videos:
- https://drive.google.com/open?id=1fqO9km2WZjyCSB4wgL0cffQW23quMM_i
- https://drive.google.com/open?id=1xYbw85GV_86ip1iqYvyuotbr9Ia7tzYO
- https://drive.google.com/open?id=1rfgmQJA11ZipxeAxR3xEyT6uBFQ2st4M
Status | Released |
Category | Other |
Author | fishingelf |