Pole
In this example, the goal of the agent is to keep the pole’s center of mass above its pivot point by applying different torque on it. The only external force is the gravity, which tries to make the pole falling down.
Before the training, the system with agent giving random torque looks like this:

The pole swings randomly without trained agent.
After the training, the agent is doing what we want it to do:

We also provide another scenario with visual observation(the camera image) instead of vector observation(angle and speed of the system). Because one frame of camera does not tell the velocity, and our agent does not have memeory yet, a velocity indicator graphic is added.
Here is the trained agent with visual observation:

Go to Sourcecode
This Pole example is one of the examples in the the UnityTensorflowKeras repository. Go to the repository from the link below to install it according to the instructions.
The Pole example is located under Assets/UnityTensorflow/Examples/Pole directory.
For more information about this example, see Here.
Exercises
NA
Xiaoxiao Ma EXAMPLE-UNITY
Games Unity