The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration