/ student tools
Connect Four
Live
You: 0AI: 0
You
AI
Privacy First: Your files are processed securely. Whenever possible, processing happens in your browser and files are never stored on our servers.
Classic Connect Four vs AI using minimax with alpha-beta pruning (depth 5). Click column to drop piece; AI responds immediately. Win = 4 in a row (horizontal, vertical, diagonal). Winning cells highlighted. Hover preview shows where piece lands. Score counts player vs AI wins across games. First-mover alternates each game.
How to Use
- 1Click any column to drop your red piece - it falls to the lowest empty row
- 2Try to connect 4 of your pieces in a row (horizontal, vertical, or diagonal)
- 3The AI (yellow) will respond after your move - it plays to block and win
- 4Hover over a column to preview where your piece will land
- 5Win the round, then play again - the first-mover alternates each game
Features
- 7×6 grid with gravity simulation
- Click column to drop piece; AI responds immediately
- Minimax depth 5 with alpha-beta pruning
- AI evaluation: window scoring (4/3/2-in-a-row weighted), center column bias
- Win detection: 4 in a row in all 4 directions
- Winning cells highlighted (brighter + white border)
- Column hover preview showing piece landing position
- Score counter (player wins vs AI wins)
- First-mover alternates each game
- 100% browser-based - no account needed
Frequently Asked Questions
Guest PlanUpgrade
/ related tools
Community Feedback
Like
00
Total Rating
No ratings yetReviews
No reviews yet. Be the first!
Rate & Review
Was this tool helpful?
Rate this tool:
Write a Review
0/500