A browser-based Connect Four game with AI opponent using Minimax algorithm and alpha-beta pruning.
c4 is a browser-based implementation of the classic Connect Four game where players compete against an AI opponent. It's built with TypeScript and uses HTML Canvas for rendering, featuring an AI that employs the Minimax algorithm with alpha-beta pruning to make strategic moves.
Web developers and game enthusiasts interested in classic board game implementations, AI algorithms in gaming, or TypeScript/Canvas projects.
Developers choose c4 for its clean implementation of game AI using Minimax with alpha-beta pruning, educational codebase for learning game development concepts, and polished browser-based gameplay experience.
🔴🔵 Connect Four game in JS + Canvas
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements Minimax with alpha-beta pruning for strategic gameplay, making it a clear example for learning game AI algorithms, as emphasized in the README's focus on clean code.
Built with TypeScript, ensuring type safety and maintainability, which is highlighted in the GitHub description for a robust development experience.
Uses HTML Canvas for graphics, providing smooth visual performance directly in the browser, as noted in the key features for responsive controls.
Runs entirely in modern browsers without plugins, offering an accessible gaming experience with no additional installation required.
The README admits the evaluation function is hard-coded, so the AI may not make the most optimal moves, reducing its effectiveness as a challenging opponent.
Canvas rendering requires low-level code changes for visual customization, unlike DOM-based approaches where CSS can easily modify styles.
Lacks common game features like undo/redo, multiple difficulty levels, or sound effects, making it less polished for extended play.