Building a Ball Balancing AI in Unity, Part 2

In Part 1 we looked at how to model and integrate an AI that balances a ball on a platform using neural networks and SmartEngine . To recap, this is the AI we are building: The final, trained AI in action When we last left, we had an integrated, functioning AI manipulating the torque on our platform, but we had not trained the AI. The result was that the AI failed miserably at its job because it was essentially giving random output. In this article, we're going to train our AI to produce the results we want. Let's begin! When you are ready to train an AI, you need to have a plan of attack. The first decision to make is what training methodology to use. SmartEngine provides three high level ways of training: gradient descent, reinforcement learning, and genetic training. Gradient descent is the tried-and-true method of training where the user supplies a set of i

Building a Ball Balancing AI in Unity, Part 1

Go to Part 2 The last post touched on an example that we will now look at in greater detail. In this example, we will be building an AI that brings a dropped ball to rest at the center of a platform. To accomplish this task, the AI will apply a torque to the platform to navigate the ball towards the center. For those unfamiliar with physics terms, torque simply means a rotational force on the platform. This is part one of a two part walkthrough. This post will cover the thought process and code behind building the AI and part two will cover training the AI we create. The source code and Unity project for this example can be found in the SmartEngine Unity Example Projects on GitLab. You'll need the SmartEngine AI Library , which is free for Indie developers. Let's get started! The final, trained AI in action Here is how the scene is set up in Unity:

A Gentle Introduction to Machine Learning for Games

Hello! If you're reading this, you probably have some combined interest in machine learning and games. Maybe you've seen the results produced by research teams and would like to incorporate such technology into your own game. Or perhaps you are just curious what machine learning is all about. If this describes you, great! You've come to the right place. In this post, I'm going to give an overview of how I go about using machine learning to develop AI for my games. I'll be making references to SmartEngine , a game-centric machine learning library I've been developing, but the concepts apply to any framework you use. This article is intended for developers, but there is some general knowledge that can be useful to all disciplines. Machine learning is an exciting and rapidly growing field with uses across all industries. Within the game industry, there are many use cases. The most obvious (and the one I'll be discussing here) re