This project involves a new approach to robot learning from demonstration which allows experimenters to teach multiple robots nontrivial, heterogenous collective behaviors in real-time. Training multiple robots is challenging because while the experimenter may know what emergent collective behavior he wishes to achieve, it is unlikely that he knows what individual robot behaviors, and their interactions, will achieve it. This project decomposes robot teams or swarms into a social hierarchy of leaders and subordinates. Small groups are then trained at the bottom of the hierarchy relatively simple collective behaviors, then groups of leaders are trained progressively with more complex and abstract behaviors, until all trained top-level root behaviors have been learned. The project examines homogeneous behaviors within robot groups, heterogeneous behaviors among the robots, and mixtures of the two at any level in the hierarchy. The method builds on prior work in single-robot behavior training, which used decomposed hierarchies of behaviors consisting of finite-state automata and learned transition functions. Beyond robotics, the project also allows the development of group behaviors for virtual agents found in animation and in emerging agent-based models in the social sciences and biology. The work integrates with a teaching and research robotics laboratory, with agent-based modelers in the social sciences, and with robotics education efforts in K-12 underprivileged schools.