An Entropy-Based Model for Hierarchical Learning