Add iterative learning sequence. Still need to debug mode sequence inference.