The OpenTafl Computer Tafl Open

Thank you for your interest! The next OpenTafl Computer Tafl Open will be played in December, 2022.

Welcome to the official page for the OpenTafl Computer Tafl Open, the original AI tournament for the Norse tafl games. Please join us for discussion at the Conclave, or read on for an introduction to the game of hnefatafl, the reason for this tournament, and details on the tournament variant and the structure of the tournament.

Deadlines and submission guidelines

  • Submit your entries by the end of December 15 of tournament years. (Practically speaking, this means, ‘by when I wake up on December 16’.) Late entries may be accepted at my discretion, up to the beginning of the tournament. Tournament play is most likely to begin on December 23, but I reserve the right to reschedule.
  • Submit your entries by email in a zip or tar archive. (If your mail host or mine blocks your attachment, a shared Google Drive or Dropbox item is fine.) Include a README describing how to run your engine in OpenTafl engine mode, along with any biographical information, or information on the inner workings of your AI, you’d like me to mention in covering the tournament.
  • Please test your entry on Linux; it’ll be running on that platform. If your entry does not work and the tournament has not yet begun, I’ll give you a chance to get it up to speed.
  • If your entry has any dependencies which are not widely available, please include them with your entry, or tell me where I can find them.
  • Over the course of the tournament, watch the Soapbox for coverage and game files.

Confirmed entrants (2020)

  • Jay Slater: OpenTafl AI (round-robin stage only)

1. What is tafl?
Tafl, in my usage, encompasses all of the games in the hnefatafl family. Hnefatafl is a board game which originated in Scandinavia in the Dark Ages, and dominated the board-gaming environment until the eventual ascension of chess, following the Viking Age. You can read more about the history of hnefatafl, its variations, and its rules at Cyningstan, the foremost online resource on such topics. Once you have finished that, you can play online against other humans at Aage Nielsen’s site, or against local humans or an extremely mediocre artificial intelligence using OpenTafl, my creation.

2. Why a computer tournament?
For one, tafl games are interesting problems, computationally speaking. Depending on the set of rules, larger-board tafl games range from on par with chess to between chess and go.

They also present some challenges that chess AIs do not face. A chess position is easy to evaluate based on material; evaluating a tafl position requires encoding knowledge about position, in a deeper and more complicated way than chess does.

Finally, the study of tafl games from a computational perspective is in its infancy. You will be writing some of the first artificial intelligences designed to play tafl games, and this is the first tournament for tafl AIs. Not only will you be contributing in a major way to the understanding of tafl games, you will be contesting the title of ‘first’.

3. How will this work?
At the highest level, you will write an artificial intelligence to play tafl games. (See below for the rules.) Games will be played using OpenTafl as a host for external engines. This feature is currently available in the stable build of OpenTafl. The specification for the engine protocol is available here, and the referenced OpenTafl Notation specification is available here. Your submission should be targeted and, if necessary, compiled, for 64-bit Linux. Java submissions will be run against the latest version of Java 11. Your AI will play in its own Amazon EC2 large compute-optimized instance, connecting with the tournament server over the network.

Your submission will be due on December 15th. The tournament will be played in two stages: a round-robin stage, to determine initial rankings and seeds, and a single-elimination bracket stage, to crown the overall champion. Each matchup will be two games long, each AI playing each side once. If one AI wins both games, that AI is the victor. If each AI wins one game, the AI which wins in the fewest moves is the victor. All games will be played with three ten-second overtime periods and no main time. Following the championship match, I hope to find a human tafl champion willing to face the computer champion in an exhibition match. The human player will have the choice of time control, within reasonable limits.

4. What are the rules for the tafl game my AI should play?
The variant for this tournament will be Fetlar Computer Rules tafl. Take the rules for Fetlar (available here), and apply the following modifications:

  1. No draws are allowed. Draw fort formations, where the king is free to move inside an invincible formation of defenders, have no special meaning.
  2. If the defenders are fully surrounded (that is, if no defending piece, given an unlimited number of moves from the current position, with no responses from the attacker, can reach the edge), the defenders lose.
  3. Board positions may be repeated a maximum of two times. On the third repeated board position, the player who made the move to enter the repeated position wins. (Read another way, this means that the aggressor—the player who is forcing the threefold repetition—loses.)

The OpenTafl Notation rules string for this variant is:
dim:11 tfr:w start:/3ttttt3/5t5/11/t4T4t/t3TTT3t/tt1TTKTT1tt/t3TTT3t/t4T4t/11/5t5/3ttttt3/

5. Is there a prize?
The author or authors of the championship-winning AI will receive a $50 gift card to their online retailer of choice (or Amazon, if no choice is forthcoming), along with a spiffy certificate suitable for framing (or possibly an electronic version of a spiffy certificate suitable for printing, and then framing, if postage costs make mailing untenable).

6. How can I enter?
Please leave a comment here on this page, or contact me directly.

7. What can I do to help?
Your donation is greatly appreciated, but not required in the slightest: the CPU time for the tournament is unlikely to cost more than about $25, even if the response is much greater than I anticipate at this juncture. Any donations received will be allocated in the following order: paying for CPU time, increasing the first-place prize to $100, adding a second-place prize of $50, and adding a third-place prize of $25. Any further donations will be re-donated to the Electronic Frontier Foundation.

9 thoughts on “The OpenTafl Computer Tafl Open

  1. Jono

    I’ll confirm here that I’ll have an entry 🙂 There’s one issue for me that’s a roadblock right now though.

    Using OpenTafl 0.2.5b I get an exception whenever it tries to save the settings (i.e. leaving the Options menu or quitting the program). The line is:

    Exception in thread “main” java.lang.NullPointerException
    at com.manywords.softworks.tafl.ui.lanterna.settings.TerminalSettings.saveToFile(TerminalSettings.java:76)

    and I am in a (Linux) directory that should has write permissions enabled.

    Reply
    1. Fishbreath Post author

      Yikes. Thanks for letting me know—that’ll teach me to do releases without testing in a clean directory.

      Hotfix coming in a few minutes.

  2. Noé Falzon

    Can you detail how the timing works? I didn’t get “All games will be played with three ten-second overtime periods and no main time.”

    Reply
    1. Fishbreath Post author

      One of OpenTafl’s timing options is go-style byo-yomi overtime, which is detailed more in the OpenTafl readme. The short version is, you get three slices of ten seconds each. If you fully use a ten-second slice, you lose it. Some examples, starting with 3×10-second overtimes:

      1. Use 9 seconds. Result: start your next turn with 3x10s.
      2. Use 11 seconds (one 10-second overtime, 1s out of the next). Result: start your next turn with 2x10s.
      3. Use 19 seconds (one 10-second overtime, 9s out of the next). Result: start your next turn with 2x10s.
      4. Use 29 seconds (two 10-second overtimes, 9s out of the next). Result: start your next turn with 1x10s.
  3. Brendan Hansknecht

    This looks like a fun project. Kinda sad that tafl doesn’t get more interest. I am thinking that i may try to train an alphazero style ai for this. That being said, no idea how much compute it would take to be decent. I have messed around some with Brandubh and it seems that an AI can learn quite quickly, but that is a smaller game.

    Also, depending on the hardware that the tournament is run on, a deep learning based ai may run extremely slow.

    Reply
    1. Brendan Hansknecht

      Oh, can you clarify one rule, what is the third repeat of a position? Is it the 4th time the board position has been seen(repeated 3 times), or does the first time a position is seen count as the first repeat?

    2. Fishbreath Post author

      Deep learning has a lot of potential for tafl—it has some features that make it resistant to classical AI techniques.

      Depending on the characteristics of the model, it might indeed not run especially fast on the Amazon VMs I’d use for a full tournament. For the average case (zero to one entries), I might instead run an exhibition match on my own hardware.

      To your question, the third appearance of a board position is the third repetition—the first one counts.

Leave a Reply

Your email address will not be published. Required fields are marked *