Reinforcement Learning based optimal control with a probabilistic risk constraint