Bacteria could learn to predict the future