Optimal decision-making, plasticity and biases: a modelling study