BAM: Bayes with Adaptive Memory