Using demand law in Qlearning