PettingZoo Connect Four
A two-player game benchmark for evaluating move selection, opponent modeling, and search.
Published by Farama Foundation
Setup and evaluation
Agents alternate dropping pieces into columns and try to form a four-piece line. Use the legal-action mask to avoid full columns, and evaluate each policy from both player positions so the first-move advantage does not skew results.
Install with pip install 'pettingzoo[classic]', import connect_four_v3 from pettingzoo.classic, and create an environment with connect_four_v3.env().
- Framework
- PettingZoo
- Access
- Local PettingZoo environment. No account required.
