Valerio Ciotti

Writing · January 2025

Connect 4 vs AI Ensemble

Challenge a tournament-winning AI ensemble in Connect 4. This AI combines 5 neural networks trained on 750k games and won first place against 35+ AI opponents.

competitioncoding

Challenge a tournament-winning AI system in Connect 4. This ensemble of 5 neural networks dominated a comprehensive tournament against 35+ other AI opponents.

The AI Opponent

You're playing against "Custom-Ensemble-Top5Models-q" - a sophisticated AI system that:

  • Combines 5 CNN-based Deep Q-Networks trained on 550k to 750k games each
  • Uses Q-value averaging for strategic decision making
  • Achieved #1 ranking with 63.4% win rate in tournament play
  • Applies weighted strategy (30%, 20%, 20%, 15%, 15%) based on model performance

Updated in October 2026: the five networks now run directly in your browser instead of on a server, so the first move is instant. Open the game full screen.

How the AI Works

Ensemble Architecture

Combines 5 CNN-based Deep Q-Networks trained on different amounts of gameplay experience (550k to 750k episodes each)

Q-Value Averaging

Each model predicts Q-values for all moves, then weights are applied and averaged for final decision

Weighted Strategy

Model weights: 30%, 20%, 20%, 15%, 15% based on training progression and performance

Tournament Proven

Winner of comprehensive tournament against 35+ AI opponents including other ensembles and individual models


Controls: click a column to drop a disc, or press 1–7. Press H for a hint, N for a new game.

Comments

Sign in with GitHub to leave a comment or react.