Modelling Herd Behaviour in Traffic Jams using Markov chains-based Reinforcement Learning