Connect Four is a two-player strategy game played on a vertical 7×6 grid where players compete to align four of their colored discs.
Setup: The game begins with an empty grid. One player uses yellow discs, the other uses red discs.
Gameplay: Players take turns dropping one disc from the top into any of the seven columns. The disc falls straight down, occupying the lowest available space within that column. The first player to form a horizontal, vertical, or diagonal line of four of their own discs wins the game.
Strategy: Players must balance offensive moves (creating their own winning threats) with defensive moves (blocking their opponent's potential wins). Creating multiple simultaneous threats—known as "forks"—often leads to victory since your opponent can only block one threat at a time.
Winning: The game ends when a player successfully connects four discs in a row (horizontally, vertically, or diagonally), or when the grid is completely filled. If the grid fills without any player achieving four in a row, the game is a draw.
Key Insight: Center column control is crucial as it provides the most opportunities for creating winning combinations. The middle column touches the most potential four-in-a-row lines. Corner and edge positions offer fewer connection possibilities.
Starting the Game: First, choose who goes first by clicking on one of the two circles at the top of the board—the left circle for you to start, or the right circle for the computer to make the first move.
Making Moves: During the game, click on any column to drop your disc. The disc will fall to the lowest available position in that column.
After the Game: Once someone wins or the board fills up, click anywhere on the screen to proceed to the analysis phase. Here you'll receive commentary on key moments from the game.
Reviewing Analysis: The trainer will show you specific board positions with explanations. Take your time to understand what the AI noticed about your play style and strategy.
Playing Again: After the analysis, you can start a new game and apply what you've learned!
This trainer is built entirely in Rust using the Macroquad framework and compiled to WebAssembly for smooth browser-based gameplay. The AI uses classical game tree search algorithms optimized for Connect Four's game space.
Note: On first load, the game needs to initialize audio resources (~10MB). This may take a few seconds and you might notice some flickering during the initial loading screen. This is a known WebAssembly behavior and only happens once per session.