Model for hierarchical learning (Tani & Nolfi, 1999)