Elements of Agent-based Computational Economics