Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 930 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 930 Bytes

c4

c4, stands for Connect Four, is a browser game in JavaScript using HTML5 features (canvas). I also incorporate an AI using Minimax algorithm and alpha-beta pruning. The evaluation function is hard-coded, and hence the AI may not be moving using the most optimal move.

Play

How to Play?

In each turn, drop a piece in one of the seven column.

Objective

Connect four of your pieces vertically, horizontally, or diagonally before the other player do so.

More info

Read Wikipedia page on Connect Four

Compatibility

Tested in latest Firefox (27), Chrome (31), and IE (11). Turn on browser console to see the "value" of the move chosen by AI.

License

This work is licensed under MIT License.