Play Shift Three Online

Drop discs into a 3×3 standing grid or shift a row sideways. Be the first to connect three in a row. Challenge the AI or play with a friend.

Created by Brian Hamilton

Pick Your Side (yellow starts first)
Game Mode
AI Difficulty
You: 0
vs
AI: 0
Your turn — drop or shift
How to play Shift Three

A 3×3 board standing upright. Get three of your discs in a line — across, down or diagonally — to win.

  • On your turn, either drop a disc into a column, where it falls to the lowest free space, or slide a whole row one place sideways.
  • Whatever is on the edge of a row you slide is pushed off the board and out of the game. It does not wrap round and it does not come back.
  • After a shift, gravity settles everything that is left.
  • A shift moves both players' discs, so it can complete a line for your opponent — and they win it, even though you moved.
  • Each row can only be slid one place from its starting position and back again. If nobody has won after 60 moves the game is a draw.

Controls: tap a column to drop a disc, or use the arrows beside a row to slide it. Undo takes back the last move. Choose your opponent — three AI levels or a second player — above the board.

Shift Three strategy game — drop discs and shift rows to connect three in a row on a 3×3 grid

Two moves, and only one of them is obvious

A 3×3 board standing upright. On your turn you either drop a disc into a column, where it falls to the lowest free space, or slide a whole row one place sideways. Three in a line — across, down or diagonally — wins.

The drop is Connect 4 in miniature and needs no explanation. The shift is the reason the game exists, and it does something no other game on this site does: it destroys material.

A shift pushes the edge disc out of the game for good Two boards side by side. On the left, three discs sit along the bottom row and the right-hand one is outlined. On the right, the same row after being shifted one place to the right: the outlined disc has been pushed off the edge and removed from the game entirely, leaving two discs where there were three. Shifting therefore destroys material as well as moving it, which is how a line that cannot be blocked can still be broken up.
The disc on the edge is pushed off the board and out of the game for good, so a shift destroys material as well as moving it.

Whatever is on the edge of the row you slide is pushed off the board and out of the game permanently. It does not wrap round, and it does not come back. That gives you a way to break up a line you have no square left to block — at the cost of a whole turn, and of whatever else was in that row.

Each row can only be slid one place from where it started, and then back. There is no sliding a row away down the board, and no shuffling for ever: the game is called a draw after 60 moves.

The move that loses on the spot

Shifting moves everybody's discs, and gravity settles them afterwards. So a shift can complete a line that is not yours.

Shifting a row into the opponent's winning line Two boards side by side. On the left, a position with no line for either player. Yellow shifts a row sideways; on the right, the resulting position after the row has slid and gravity has settled the discs, and red now has three in a line. The game is awarded to the player whose line it is, not to the player who moved, so yellow has lost by their own move. Checking what a row looks like after it settles, for both colours, is the way to avoid it.
Yellow slides a row, gravity settles it, and the line that appears belongs to red. The game goes to whoever the line belongs to, not whoever moved.

The line belongs to whoever's colour it is, not to whoever moved. You can lose this game entirely by your own hand, and it is the most common way a comfortable position gets thrown away. Before you slide a row, work out what it looks like after it settles — for both colours.

The game is solved, and the first move decides it

A 3×3 board with gravity means each column is a stack of at most three discs, so there are only 3,375 possible boards. Add the row positions and whose turn it is, and the entire game is 182,250 positions. That is small enough to work out completely rather than search — so it was, exactly, in about three and a half seconds.

The solved opening: only the middle column wins An empty three by three board with the bottom middle square outlined. Working the whole game out exactly - all 182,250 positions - shows that the player moving first wins, but only by dropping into the middle column. Dropping into either outer column is a draw, and all six possible opening shifts of an empty row lose outright. The computer opponent does play the middle column, so a human moving second is playing for a draw.
Working the whole game out exactly: only the middle column wins. The outer two draw, and all six opening shifts lose.

The player who moves first wins, and there is exactly one opening move that does it: drop into the middle column. Dropping into either outer column is a draw. All six ways of shifting a row on move one — sliding a row you have no discs in — lose.

That last result is worth sitting with. On an empty board a shift changes nothing at all except whose turn it is, and handing over the tempo is enough to lose the game outright. Shifting is a real move with a real cost, and on move one you have nothing to gain by it.

The computer takes the middle column when it moves first, so if you are second you are playing for a draw — and a draw is a genuine result here. If you move first, take the middle column. Anything else throws the win away immediately.

How to play the rest of it

The middle column is worth more than the middle square. Gravity means you cannot place where you like: you choose a column and take what you are given. The centre square sits on four of the eight winning lines, and the only way to reach it is through the middle column.

A shift is worth a turn only if it does two things. Breaking your opponent's line while building your own, or removing one of their discs while improving your own shape. A shift that only defends usually hands back the initiative — as the opening result shows in its purest form.

Count what falls off. The disc at the edge of the row is the price. If it is one of yours, a shift that breaks their line may cost you the game two moves later.

Watch the bottom row. Gravity fills it first, so it is where lines complete soonest — and it is also the row most often worth shifting, because it has the most discs in it to move.

What was verified on this page

The board is small enough that most of the checking could be exhaustive rather than sampled. All 3,375 reachable boards were tested: gravity leaves every settled board untouched, every one of the 20,250 possible shifts matches an independent implementation of the rules, a dropped disc always lands on the lowest free cell, and win detection agrees on every board.

The exact solution was then checked against the page before any of it was believed. The solver has its own implementation of the rules, which is only worth something if it is solving the same game the page plays — so the two were compared move for move across all 34,371 live positions. They agree on every legal move and on every resulting position.

The AI plays this game very well. Given a position the solution says is won, it holds the win in 148 of 150 cases, and across 300 positions of all kinds it plays an optimal move 297 times. It also opens with the winning middle column.

One thing was changed. The Hard setting searched twenty moves ahead, which on a board this small buys nothing at all: against the exact solution, depth 12 plays an optimal move 297 times out of 300 — and so do depths 16 and 20. The extra depth cost fourteen times the thinking and produced pauses over 1.2 seconds. Hard now searches to 12: identical play, and the longest pause dropped to a fraction of that.

Each depth measured against the exact solution over the same 300 positions. Play stops improving well before the depth the page was using.
Search depth Optimal moves Median time Worst
2284 / 3000ms4ms
6293 / 3001ms20ms
8296 / 3002ms77ms
12297 / 3005ms105ms
16297 / 30017ms281ms
20297 / 30069ms1,228ms

The three settings now search to 6, 8 and 12. Be aware that on a board this small they all play well — the honest difference is that Easy plays a random move 35% of the time, which is what makes it forgiving. Medium and Hard are separated by about one position in three hundred.

A small game with an exact answer

Most abstract games are interesting because nobody knows the answer. Shift Three is interesting for the opposite reason: it is small enough to hold in one piece. Noughts and crosses is solved and dull because the answer is "always a draw, and it is easy to draw". Here the answer is sharper — a win for the first player, on exactly one opening move — and it is still not easy to execute, because the shift makes positions change shape in ways that are hard to read even a few moves out.

It sits alongside games like Nim, where knowing the theory tells you exactly what to do, and unlike Go, where nothing of the sort will ever be possible. Shift Three is at the size where a game stops being a mystery and becomes a fact — and the fact turns out to be that the middle column is everything.

More Puzzle & Strategy Games

If you enjoy Shift Three, check out these other games on our site: