Four in a Row on this board is a 6 by 7 grid with 69 possible four-in-a-row windows. Twenty-four run horizontal, twenty-one vertical, and twelve run along each diagonal. Where you drop decides how many of those lines your disc can still join, and the engine's own AI tells you which column it fears.
The center column owns the win lines
Count the windows each column participates in. Column four, the center, belongs to 51 of the 69 lines. The columns next to it belong to 39. The edge columns belong to only 15.
The AI evaluation confirms the arithmetic. Every disc the AI holds in the center column adds 6 points to its board score, and its search tries center columns first for faster pruning. When your opponent's code pays a bonus for one specific square, take that square early.
Your opening sequence is fixed.
1. Drop your first disc in the center column.
2. Drop your second in the center column if it is still open low, otherwise the adjacent column.
3. Keep at least two of your first four discs in the three middle columns.
What each difficulty actually computes
The three levels differ in search depth, and the difference decides which tactics work.
Easy checks one move ahead. It takes a win if one exists, blocks your winning square if one exists, then plays a random valid column. It never reasons about the move after that.
Medium runs minimax to depth 3, so it sees its move, your reply, and its follow-up. Hard runs depth 5 and sees two full exchanges. Both score a win at 100000 plus the remaining depth, which means they prefer faster wins and defend best when the threat is close.
One rule holds at every level. A single open three from you gets blocked, because even Easy scans for immediate wins. One threat never wins the game. Two threats on the same turn do.
Build the double threat
Since one winning square gets blocked, your plan is to create two at once. The window scores show how the AI values danger. Three of its discs with one empty pays 50. Three of yours with one empty costs it 80, so it over-values blocking relative to building. Push it into that bias.
1. Pile discs in the three center columns during the first six moves.
2. Form one horizontal three with both end squares open. The AI must block one.
3. On your next turn, complete a second three that uses the square above the AI's block, so its defensive disc became your ladder.
Avoid one specific gift. Never drop in a column where your landing square gives the AI the winning square directly on top. Before you release, check what the AI wins by playing on top of your disc. The input lock during the drop animation means you cannot cancel, so this check happens before the tap.
Timing and pace facts
The AI waits 0.35 seconds before answering, and a drop animation with gravity of 3800 pixels per second squared and up to three bounces plays before the board state updates. Your click during the animation is rejected. Plan your next move while the disc falls instead of after, and you gain back most of that delay.
Win and loss counts persist in local storage across sessions under the engine's stats key, so your record against each level is real data you can track.
The column ordering inside the search is also a tell. The AI tries column 3 first, then 2 and 4, then 1 and 5, then the edges, at every node of its search. When two moves score equally, the center-most wins the tie. You can exploit this on Easy, where equal-value random play still lands center-heavy over many games, so edge-first openings from you meet predictable center pressure.
Four in a Row checklist
- [ ] First disc in the center column.
- [ ] Four of the first six discs within the middle three columns.
- [ ] Every turn, check your own winning drop first.
- [ ] Then check the AI's winning drop and block it.
- [ ] Then check whether your landing square gifts the AI the square above it.
- [ ] Work toward two simultaneous threes, because one is always blocked.
- [ ] Decide the next move during the 0.35 second AI delay and the drop animation.
The honest downside. Perfect play on this board is a first-player win on paper, but this engine's Hard depth of 5 with a window-sum evaluation is not perfect play, and it still blocks most casual forks. The double threat pattern also fails when your supporting discs sit on even rows, because the AI's block can simultaneously complete its own ladder, and the eval of minus 80 will not warn you. Open [Four in a Row](/en/connect-four), play five games against Medium and five against Hard with this checklist, and compare your win counts. If the center-first plan does not raise your Medium record, send me the column logs, because the failure will be in the fork step rather than the opening.