Dynamics of pre- and post-choice behaviour: rats approximate optimal strategy in a discrete-trial decision task