Designing an intelligent teaching simulator for learning to teach by practicing