ML-agent Playground

This week, my capstone team and I created our machine learning agent that will play our Breakout clone! There aren’t too many observations necessary to train it successfully, and each round of breakout provides a ton of rewards and punishments, so I expect training to go pretty quickly once we have all of the observations ironed out.

To learn about ML-agent implementation, specifically in Unity, I took a look through the awesome and exhaustively documented Unity-Technologies ml-agent learning environment repository at https://github.com/Unity-Technologies/ml-agents. This resource is excellent for playing around in Unity and learning a variety (18 environments!) of ways to implement basic observations and methods for testing agents. My favorite of them is probably the 3DBall example, where a series of cubes (the agents) would rotate to keep a ball (the target) from rolling off of them. This one is cool because of how it translates the velocity and position of the ball into the required speed and angle of rotation for the cube. The first few tests look like the agent has no idea what’s going on, and it’s cool to see it steadily catch the hang of the game.

If you’re reading this, check out that repo for yourself! Making an AI play a game is a weirdly fun game in and of itself!

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *