Behaviour Learning with Adaptive Motif Discovery and Interacting Multiple Model