VictorIA
Connect 4 · negamax + α-β

Play Connect 4 against VictorIA

VictorIA is the decision brain of a computer-vision + robot-arm Connect 4 player. The original watches a physical board through a camera and drops real pieces; here you play the same AI in your browser.

Your move — you are red.

How VictorIA decides

Search

Negamax with alpha-beta pruning explores move sequences; center-first ordering makes pruning bite hard.

Shortcuts

Always takes an immediate win and always blocks the opponent's immediate win before searching.

Evaluation

Scores every 4-cell window (twos, threes, open fours) and rewards central control.

The full (physical) system

In the robot build, this engine is one of four stages:

  1. See — a camera captures the board; segmentation + circle/grid detection locate the 6×7 cells.
  2. Read — each cell is classified (empty / red / yellow) to recover the exact board state.
  3. Thinkthis engine picks the best column.
  4. Act — a robot arm drops a piece into that column, then the loop repeats.

The vision + arm stages need physical hardware; the engine is rebuilt here in full and is playable above.