YayPlays

How to play

King Tafl: Choose a level
1Choose a level
King Tafl: In play
2In play

Controls

TapKeyboard←→↑↓ Space U H
  1. Tap a piece, then tap a dot to slide it.
  2. Sandwich enemies to capture.
  3. Keys: arrows, Space, U, H.

King Tafl: all 6 rivals beaten on both sides, 18 of 18 stars

All six rivals were beaten at the first try without undo or hint, losing at most 2 pieces each: 18 of 18 stars. That was our second script version. The first won rivals 1 to 5 and then lost to Ulf twice, the same way, while attacking for about 3 seconds of search a move. The second searches exactly 5 moves deep against Ulf and beat him in 15 moves. Every move came from our own search, not the game's AI or hint; only its move and capture rules were copied.

Escape or capture

  • A 9 by 9 board: 16 attackers ring the edges, 8 defenders guard the king on the central throne. Defenders win when the king reaches a corner; attackers win by capturing the king.
  • Every piece slides like a rook. Only the king may stop on the throne or a corner.
  • A piece is captured when the enemy sandwiches it; corners and the empty throne count as enemies. On the throne the king needs four attackers around him, next to it three plus the throne.
  • Stars: a win, no undo or hint, and three or fewer pieces lost. Tap a piece, then a dot; keys: arrows and Space or Enter, U undo, H hint.
Bjorn: the king reaches the corner, 13 attackers and 8 defenders left.
Bjorn: the king reaches the corner, 13 attackers and 8 defenders left.

How we played

Each turn the search looked ahead with a table of positions already seen and our own scoring: pieces, the king's open lines to the corners and his escape routes two moves deep, his free squares, attackers next to him and attackers on the squares that guard the corners. As attacker it weighs the corner guards and the two-move escapes more and presses closer to the king as the game goes on.

RivalRival AI (code)We playOur movesPieces lost / takenStars
Bjorneasydefenders80 / 33
Astrideasyattackers171 / 23
Leifnormaldefenders121 / 43
Freyanormalattackers280 / 53
Ragnaharddefenders162 / 23
Ulfhardattackers152 / 63
Ulf, attacking: LOST ONE! as a defender is taken, 15 attackers against 7 defenders.
Ulf, attacking: LOST ONE! as a defender is taken, 15 attackers against 7 defenders.

What the games show

The ladder alternates sides: you defend, then attack, against an easy, a normal and a hard rival. The defending games were short, 8 to 16 of our moves, because the king finds an open line quickly. Attacking took longer, up to 28 moves against Freya, since the king has to be closed in before he can be caught. Against Ulf, the time-limited first version lost 9 pieces and the game after 22 of its moves; the depth-5 search took 6 pieces and the king in 15.

Ragna beaten as defender: ESCAPED! with three stars.
Ragna beaten as defender: ESCAPED! with three stars.

Playing it yourself

Use the danger overlay: picking a piece marks every square where it would be sandwiched next turn in red, and your pieces that can be taken right now pulse red. As defender, move the king toward a row or column with only one attacker on it; two open lines at once cannot both be blocked. As attacker, guard the squares next to the corners before chasing the king, then close the ring.

Ulf beaten as attacker: VICTORY! with three stars.
Ulf beaten as attacker: VICTORY! with three stars.

Questions

Why can't I capture the king next to the throne?
There he needs three attackers plus the throne around him, and four on the throne itself.
What does the red overlay mean?
Squares where the picked piece would be captured next turn, and your pieces that can be taken now.
How far did our run get?
All six rivals beaten, 18 of 18 stars.

· Corrections log

Suggest an idea or report a problem

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