First,
it sees.
Your board. Your table. One webcam.
Computer vision finds the grid and reads every red and yellow disc. The real world becomes a game state.
Four-point calibration
An open-source experiment in human × machine.
Connect Four, built in Python. Powered by AI,
computer vision, and voice.

A real board, a webcam, and an opponent that thinks ahead. Pefforza brings computer vision, search, reinforcement learning, and optional voice commentary into one Python project. Play in your terminal, on your desktop, or with a physical board.
Inside the projectYour board. Your table. One webcam.
Computer vision finds the grid and reads every red and yellow disc. The real world becomes a game state.
Every move opens a new possibility.
Pefforza searches ahead, spots threats, and chooses its reply. Five difficulty modes. Five very different minds.
A move you can see. A reply you can hear.
An augmented-reality arrow points the way, while optional voice commentary keeps the conversation going.
Take the experiment off this page.
Clone it. Play it. Make it better.
A Pygame board, five AI personalities, and a familiar point-and-click game. No camera required.
Choose easy, medium, hard, impossible, or neural.python play_gui.py --difficulty hardOne board. Two minds. No second guesses.
Drop your first disc and find out.
A little taste of Pefforza. This browser demo uses its own search opponent. Run the Python project for the full solver, neural agent, camera, and voice.
Choose a column. Connect four discs in any direction.
Keyboard: Tab to the board, then use 1–7 or Enter.