A board game night with geeks: attacking Quarto ties with SAT solvers

6,547 views

Published on

So this one day, I am playing the board game Quarto (http://en.wikipedia.org/wiki/Quarto_%28board_game%29) with my friend and I wonder, can this game end in a tie, or is there always a winner?

Normal people might have squabbled or shrugged, but not us nerds! We obviously abandoned the game, took our laptops to the local pub and started hacking. In this talk I will explain how I used F# to transform this problem to satisfiability, ran it through an SAT solver to discover if it can indeed end in a tie.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,547
On SlideShare
0
From Embeds
0
Number of Embeds
2,926
Actions
Shares
0
Downloads
24
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • Use science!
  • AND weg, maar onder elkaar
  • AND weg, maar onder elkaar
  • AND weg, maar onder elkaar
  • Nog afmaken
  • Nog afmaken
  • Nog afmaken
  • Nog afmaken
  • Stones in S do not all have the same P
  • Stones in S do not all have the same P
  • Stones in S do not all have the same P
  • Use science!
  • http://memegenerator.net/instance2/387684
  • http://memegenerator.net/instance2/387684
  • A board game night with geeks: attacking Quarto ties with SAT solvers

    1. 1. So this one day, I am playing the board game Quarto with my boyfriend.
    2. 2. Quarto is a variant of four in a row, with two twists: One: The pieces have 4 attributes, instead of just 1 like in normal four in a row, where pieces just vary in color. In Quarto, pieces vary in shape, size, color and form of the top, as you can see here  You win if you get four pieces in a row who all have the same property. The other twist is that you pick a piece, which your opponent then places, but this is irrelevant for this talk.
    3. 3. In university I followed a wonderful course on how to solve puzzles like this, by using boolean satisfiabiliy
    4. 4. How exactly will it help us if we convert the problem to SAT? Let’s dive into how an SAT solver works.
    5. 5. No, trying all options would be too slow. SAT solvers have a use a few tricks to reduce the state space
    6. 6. The input is generated now and converted to CNF. Would it be satisfiable?? Suspense... Is.... Killing me!
    7. 7. There it is, the assignment and the accompanying board. Woohoo, we did it! Next question of course is, how many of such boards exist?
    8. 8. Thanks for watching, the code is on github!

    ×