Matlab Simulation represents the inverted pendulum placed on a linear guide with only a motor and an encoder attached.
The difficulty of this problem is unstabilizing the already stabilized pendulum to bring its nose to the top and stabilize it again.
The neural network was used to decide on when to transition from the unstabilized controller to the stabilized controller.
There is no teacher to this neural network. It learns by itself efficiently using Genetic Algorithm.