KOJP

Hnefatafl (Viking Chess) Online Game

Get the king to a corner or trap him. Three computer levels or two players

Defenders run for a corner, attackers close the ring

Tap a piece to see gold dots on every square it can reach and a red ring where a move captures. The attackers (dark pieces) move first.

Controls

Tap a piece, then a square, or drag and drop
Arrow keys to pick a square, Enter to move
Undo (Ctrl+Z) · 3 computer levels · 2 players · 7×7 quick board

What is Viking chess?

Viking chess, or Hnefatafl, is an asymmetric board game on an 11 by 11 board where a king and 12 defenders start in the middle and 24 attackers wait on the edges. The defenders win by bringing the king to any of the four corners, and the attackers win by surrounding the king on all four sides. Players often shorten the name to tafl.

Unlike chess, the two sides have different armies and different goals. The attackers have twice as many pieces but must lock the king in, while the defenders are outnumbered and only need one open road. Playing the same game from each side feels like two different games. Here you can choose to attack or defend, play an easy, normal or hard computer, or share one screen with a friend. The 7×7 Brandubh board makes a full game last about five minutes.

What are the rules of Hnefatafl?

Every piece moves like a rook in chess, any distance along a row or column, and a piece is captured when it is sandwiched between two enemies. The attackers move first and each turn moves one piece.

TopicRule
Pieces24 attackers, 12 defenders and a king (Brandubh 7×7: 8 attackers, 4 defenders and a king)
First moveAttackers (dark leather pieces)
MovementAny number of empty squares in a straight line, no jumping
Throne and cornersOnly the king may stop on the central throne or the four corner stones. Other pieces may pass over the empty throne
CaptureMove so that an enemy piece sits between the moved piece and another of your pieces. Corners and the empty throne count as hostile squares
Moving in safelyA piece that moves between two enemies on its own is not captured
KingTakes part in captures. On the throne he must be surrounded on four sides, beside it on three sides plus the throne, and elsewhere on all four sides (in 7×7 Brandubh a king away from the throne is captured by two attackers)
Defenders winThe king reaches a corner
Attackers winThe king is captured
OtherA side with no legal move loses. The same position three times, or a very long stretch without captures, is a draw

A king standing on the edge cannot be captured because one of his four sides is off the board. The edge is easy to block, though, so defenders usually do better by looking for a square that threatens two corners at once instead of rushing to the side.

How old is Hnefatafl?

Tafl games were played across Scandinavia and the British Isles from around the 4th century until about the 12th century, before chess reached the north. Bone and glass playing pieces and board fragments have been found in Viking graves and ship burials.

The name joins the Old Norse words hnefi (the king piece) and tafl (board), and the game appears in Icelandic sagas and poems. No complete rulebook survived, so modern rules were rebuilt from archaeology and from the notes Swedish naturalist Carl Linnaeus made in 1732 about Tablut, a tafl game played in Lapland. The small 7×7 Brandubh is linked to Ireland. This version follows the widely used Copenhagen rules but leaves out shieldwall captures and edge forts so that newcomers can learn it at once.

Is it easier to attack or defend?

For beginners defending is easier. One open road is enough for the king, so the attackers lose after a single slip while the defenders can recover from mistakes.

The attackers have numbers on their side, though, and once the corners are sealed the king runs out of room. Swapping sides with the same opponent is the fairest way to compare skill. During a game a gold dotted line appears whenever the king has an open road to a corner, and the king glows red when he can be captured on the next move.

How do the computer levels differ?

Easy looks one or two moves ahead and sometimes plays loosely, Normal reads three moves ahead (five on the 7×7 board), and Hard searches as deep as it can within one second.

The computer uses alpha beta search with iterative deepening and move ordering that tries captures and king moves first, so it sees further in the same time. Its evaluation counts material, the king's open roads to the edge, attackers next to the king and the guard squares in front of each corner. It thinks in a separate worker thread so the screen never freezes, and your wins, losses and draws are kept for each level in this browser.

How do you get better at Viking chess?

  1. Attackers, guard the corners first. Pieces on the squares diagonally two steps from each corner and beside them stop the king from slipping in even when he reaches the edge.
  2. Defenders, make a double threat. A king move that opens two corners at once cannot be stopped, because the attackers can block only one road per turn.
  3. The king fights too. He can be the second half of a sandwich, and corners and the empty throne also act as anvils for captures.
  4. Moving in is safe. Stepping into a gap between two enemies does not get your piece captured, so use it to block a road.
  5. Attackers, build chains. Diagonal chains of pieces form a ring with no gaps, which is much stronger than pushing single pieces forward.
  6. Defenders, value every piece. A defender is worth about two attackers. Watch the red rings before you move into danger.

Controls

The rune border is a decorative carving of the 24 Elder Futhark letters and does not spell a sentence. The board, pieces and sounds are all made in code; only your records and settings are stored in this browser and nothing is sent to a server. For more board battles try Chess or Nine Men's Morris.

Frequently asked questions

Is Viking chess free to play here?

Yes. No sign up or download, just play on this page. It works on computers, phones and tablets.

Is Viking chess the same as Hnefatafl?

Yes. Hnefatafl is the name of the 11 by 11 game in the tafl family played in Viking age Scandinavia, and because it looks a little like chess it is often called Viking chess.

How do you win?

The defenders win when the king reaches any of the four corner squares. The attackers win by capturing the king, surrounding him on all four sides, or on three sides plus the throne when he stands right next to it.

How are pieces captured?

Sandwich one enemy piece in a row or column between the piece you just moved and another of your pieces. Corners and the empty throne also act as anvils, and the king can help capture. A piece that moves between two enemies on its own is safe.

Can any piece stand on the throne or the corners?

No. Only the king may stop on the central throne or the four corner stones. Other pieces may pass over the empty throne but may not stop on it.

What is different on the 7×7 Brandubh board?

It is a small tafl game with 8 attackers, 4 defenders and a king. A game takes about five minutes, and a king away from the throne is captured by just two attackers on opposite sides.

Should I play attackers or defenders?

Defenders are easier for a first game, since a single open road wins. Once you are comfortable, try the attackers and practise sealing the corners and tightening the ring. Switch sides with the side button on the title screen.

How strong is the hard computer?

Hard searches with alpha beta pruning as deep as it can within one second, checking king escapes and encirclements first. It thinks in a separate worker thread, so the screen never freezes.