# Tic-Tac-Toe with Monte Carlo Tree Search

I have been playing around with games and tree search algorithms lately. One algorithm that I wanted to try out is the Monte Carlo tree search, MCTS for short. It tries to find certain leaves of the tree which are successful in some sense. In a recent post I have started my own tree search library and set the foundation to try more games. In this post I want to show a bit of Tic-Tac-Toe and MCTS.

Weiterlesen…

# Creating a Tree Search Library

I have recently simulated a few games using Python code, see the articles with the Game Simulation Toolbox tag. All the code is in one repository, but I haven't really written good code. It was mostly just experimenting, and I did not work as cleanly as I otherwise do. My latest addition, the backtracking with Railroad Ink ended up as completely hacky code: Control flow on the module level, no clear separation, huge functions, little use of classes. It is a total mess.

Weiterlesen…

One of my favorite board games is “Railroad Ink”. One has to build a rail and road network on a square grid using the building blocks shown on dice. During the game, my player mat looks like this:

Weiterlesen…

Yesterday I've played Nidavellir, a game where one drafts a dwarf army to fight a dragon and seize the treasure it guards. It is just about the drafting, no actual fighting. The player with the best dwarf amy wins, and that is scored by points. Dwarfs are recruited in taverns, and one the players have to bid on the three taverns, and the players can then choose the dwarfs in order of highest bids.

Weiterlesen…

# Graphentheorie in On Tour

Die Tage habe ich das Spiel On Tour gespielt. Man soll eine Band-Tournee durch die USA planen. Dabei hat man als Spielbrett diese Landkarte. In die einzelnen Staaten trägt man dann gewürfelte Zahlen ein. Man würfelt mit zwei W10 und setzt die beiden Ziffern in beiden Kombinationen zusammen. Würfelt man 1 und 5, so muss man die 15 und 51 eintragen. Es ist noch ein wenig eingeschränkt, wohin man diese eintragen darf.

Weiterlesen…

# Nachbarn bei Tridom

Tridom ist ein klassisches Spiel, bei dem man letztlich Domino mit Dreiecken spielt. Man hat eine gewisse Anzahl Steine auf der Hand, die man anlegen muss. Der erste Spieler, der keine Steine mehr auf der Hand hat, beendet das Spiel. Man bekommt beim Legen des Steines die Summe der Ziffern als Punkte gutgeschrieben; der Spieler mit den meisten Punkten gewinnt.

Weiterlesen…

# Reinforcement Learning with Frozen Lake

I have tried out reinforcement learning with the frozen lake example. In this post I will introduce the concept of Q-learning, the TensorFlow Agents library, the Frozen Lake game environment and how I put it all together.

Weiterlesen…

# Simulating Scythe: Greedy Beam Search

Scythe is a board game from the engine builder genre. Is a rather complicated game as there are different types of entities and actions around. It is about collecting resources, deploying the hero, workers, mechs and buildings, moving them around, fighting with others, accomplishing achievements. In the end one obtains a score based on the number of achievements, controlled hexes and resources as well as left-over money and some bonus points.

Weiterlesen…