YayPlays

How to play

Flip Four: Choose a level
1Choose a level
Flip Four: In play
2In play

Controls

TapKeyboard←→↑↓ Space F
  1. Tap a column to drop a disc.
  2. Once per game, tap FLIP BOARD to turn the board over.
  3. Keys: arrows and Space, F flip.

Flip Four: all three owls beaten, Hard only once our search had 10 seconds a move

Our own search beat the Easy owl in 17 moves and the Normal owl twice in 39. Hard took four rounds of our script: at 1.2 seconds of thinking per move it lost all three games, at 4 seconds it drew all three, and at 10 seconds it won all three in 21 moves, the same game each time. A last round back at 4 seconds, taking a second-best move once per game, won two games in 25 moves and drew two. Neither side plays at random on these settings, so the same thinking time repeats the same game.

Four in a row, plus one flip each

  • You are the fox with red discs and always move first. Connect four in any direction; a full board with no line is a draw.
  • Once per game each side may flip the board instead of dropping a disc. The frame turns over, every disc falls again, and the flip uses your turn.
  • A flip that completes a line only for you wins, only for the owl loses, and for both at once is a draw.
  • Easy looks two moves ahead and drops about a third of its discs at random; Normal searches four moves deep, Hard seven. Every owl takes any move that wins at once, a flip included.
Easy: YOU WIN! Four in a row in 17 moves, 750 points.
Easy: YOU WIN! Four in a row in 17 moves, 750 points.

Our search

The script ran its own alpha-beta search over the game's move rule, flips included, going one move deeper at a time until its time ran out, and scored positions by counting open lines of four: three of ours with a gap worth 50, two worth 5, the same for the owl as a minus, plus a little for discs in the centre column. The owl's own search and scoring were never used. Moves went in with Left/Right and Space, the flip with F.

It thinks while the game waits for us, for longer and more evenly than a person would.

OwlOur time per moveGamesResult
Easy1.2 s1won in 17 moves
Normal1.2 s2won in 39 moves, both identical
Hard1.2 s3lost (44, 44, 26 moves)
Hard4 s3draw in 29 moves, all identical
Hard10 s3won in 21 moves, all identical
Hard4 s, one second-best move4won twice in 25 moves, drew twice (21, 19 moves)
Normal: YOU WIN! in 39 moves, 1,060 points.
Normal: YOU WIN! in 39 moves, 1,060 points.

Hard and the flip

At 1.2 seconds per move our search could not see as far as Hard's seven moves and lost all three games. With 4 seconds it held on until move 29, then used its flip as the last move: the fall completed lines for both colours, which the rules count as a draw. Our search ranks a draw above any loss it can see coming, so a draw by flip is what it chose.

With 10 seconds a move the search went deeper and the game changed early. Both sides used their flip; ours came as our 10th move, and our next disc, in the fifth column, completed four in a row on move 21. All three games went the same way, 2,130 points each.

The last round tried other lines at 4 seconds: in each game one of our moves, the 2nd, 3rd, 4th or 5th, was the search's second choice. Deviating at the 2nd or 3rd move gave wins in 25 moves with no flip used by either side; deviating at the 4th or 5th led back to a draw by our flip.

Hard at 10 seconds a move: YOU WIN! Four in a row in 21 moves, 2,130 points.
Hard at 10 seconds a move: YOU WIN! Four in a row in 21 moves, 2,130 points.

Playing the flip yourself

The game's tips explain the trick behind our Hard draws: a flip mirrors the columns and reverses every stack, so the disc on top of each column lands on the bottom row. Watch the column tops, yours and the owl's. Four neighbouring columns topped by one colour are a win waiting for a flip, and if they are the owl's and its flip is still ready, block one before your turn ends.

Hard at 4 seconds a move: DRAW, A flip connected both colours, 300 points.
Hard at 4 seconds a move: DRAW, A flip connected both colours, 300 points.

Hard at 1.2 seconds

The first Hard games are kept here because they show what goes wrong with too short a look ahead: both sides flipped, and the owl finished its line first each time.

Hard at 1.2 seconds a move: AI WINS, the owl connected four.
Hard at 1.2 seconds a move: AI WINS, the owl connected four.

A fix we made

When the cursor sat on a full column the game tried to draw a red cross over it and failed: the drawing code referred to the canvas under the wrong name, so the cross never showed and the error repeated every frame. We fixed the name in the game; play itself was not affected.

Questions

Does a vertical line survive a flip?
Yes. A column only turns over, so three of a colour stacked in a column stay three in that column.
Does the flip use my turn?
Yes. Flipping replaces your disc drop for that turn, and each side can do it once per game.
What is a draw worth?
100 points times the setting's factor: 100 on Easy, 200 on Normal, 300 on Hard.

· Corrections log

Suggest an idea or report a problem

We keep only your message (and email, if given) to improve the games.