1D following example to test QLearning