How do social structures and group behaviours arise from the interaction of individuals? This text approaches this question with computer simulation techniques. Fundamental collective behaviours such as group formation, cultural transmission, combat and trade are considered.