Notebook: HCAI_Lab_Adversarial_Search.ipynb (Work in Google Colab or download the .ipynb file to local environment)
Work in groups of 2-4. Every group member must be able to explain the results.
Work in groups of 2-4 to build an agent for the Connect 4 arena.
Your agent receives the current board and must select a legal column for its next piece. The CodinGame version uses a 7×9 board and includes an optional STEAL action for the second player, so read the rules carefully before adapting code from the notebook.
Begin with a simple working agent that selects legal moves. Then improve it using: a hand-crafted evaluation function; depth-limited minimax; alpha-beta pruning; move ordering that prioritizes promising or tactically necessary actions.
Consider which features help the agent recognize immediate wins, opponent threats, valuable positions, and longer-term opportunities. Remember that the response-time limit prevents exhaustive exploration of the complete game tree.
Start the challenge during the lab and continue it as part of the self-study regarding classes. Selected groups may share their strategies at the next lab, and effective solutions may receive bonus points.