reinforcement learning algorithm --------q learning----simple testbench