SmartEngine  1.6.0
SmartEngine

About SmartEngine

SmartEngine is a toolkit designed to enable developers to create smart AI for games. SmartEngine focuses on the training and execution of neural network graphs with example projects that demonstrate how they can be applied to develop a game AI.

What Are Neural Networks?

Neural networks are a mathematical construct that mimic the neurons in the brain. A neuron takes in inputs from other neurons, applies some mathematical operations and produces an output. A neural network is composed of layers of neurons, all interconnected. In a simplest structure, input is fed into a neuron layer, called the hidden layer, that feeds into an output layer of neurons. The output layer is used to direct AI actions. There are different types of neuron layers, but the most basic is a linear layer. In that, each neuron has a weight and bias that are multiplied with the input and fed into an activation function. These weights and biases are not coded by the user by hand, but are instead computed through training.

What Can Neural Networks Do?

Much like the brain, neural networks can solve fuzzy problems in a very elegant, easy to use way. If the inputs are correlated in some way, the network can be trained to find that correlation. This makes them great to use with AI, where the problems aren't always easy to solve in a traditional, algorithmic way.

For instance, in a first person shooter, the AI might need to make decisions about whether to shoot, hide, find ammo, and flank the opponent. Traditionally, this would be solved using state machines with a basic function that determines when to do one or the other. These functions are hand crafted, and so may not be optimal. This leads to very predictable, boring AI. Neural networks can be used to take these inputs and produce a set of actions / movement in a less predicatable manor. They can be trained to find the best weights on the input, leading to an AI that can beat any human player.

The best part of using neural networks is that you can implement behavior through high level goals instead of hardcoding the exact actions the AI should take. You don't write code that tells the AI when to pick up ammo, but rather that it's important to get kills and not die. It will figure out on its own that picking up ammo is essential to getting more kills and when it is opportune to pick it up.

QuickStart

See the QuickStart page for jumping in and getting started.

Graph Json Schema

It is most useful to define graphs using a json resource. See the Graph Schema page for a complete list of graph options