kulturgutspiel.de – Board Game Journal
https://kulturgutspiel.de/en/science/artificial-intelligence-beats-humans-at-dice-game-qwixx

Automatically translated from German. Read the original

Science Sebastian Wenzel

Artificial intelligence beats humans at dice game Qwixx

Susann Janetzki is a games enthusiast and researcher. The 19-year-old programmed an artificial intelligence for the dice game Qwixx. With success: Janetzki won the state competition in Mecklenburg-Vorpommern for Mathematics/Computer Science at ‘Jugend forscht 2021’ with her project.


Chess, Go, Shogi: In countless board games, computers have long since surpassed humans. This now also applies to Qwixx. Janetzki’s artificial intelligence (AI) Alpha-Qwixx scores up to 170 points per game. Humans rarely achieve this. Unlike in Chess, Go or Shogi, every move in Qwixx can result in a gain or a penalty (in terms of missed rolls). “This makes it easier for an AI to learn which moves are good,” says Janetzki.

Evolutionary algorithm leads to the goal

Alpha-Qwixx was created using an evolutionary algorithm. This means: Within the software, multiple AI players with individual strategies competed against each other. In a multi-stage process following Darwin’s rules of mutation and selection, the most capable AI player gradually emerged. “The AI players consisted of two to three vectors, each with four strategy values. At the start of the evolution, i.e. in the first generation, the strategy values were generated randomly,” explains Janetzki. When an AI player’s turn came, it applied its strategy sequentially to every possible next move. Each possible situation was represented by a situation vector with nine values describing the entire score sheet.

Vier Werte der Strategie eines KI-Spielers beziehen sich auf die neun Werte eines Situationsvektors. Darstellung: Susann Janetzki
Four values of an AI player’s strategy relate to the nine values of a situation vector. Illustration: Susann Janetzki

The vectors were multiplied or added, and the sum of all their values from the resulting vector was calculated. The higher the calculated number, the better the move. Based on the actual quality of their strategies, a ranking emerged among all AI players after several games. Some were better, some worse. The AI players at the bottom of the ranking were eliminated. The top AI players became parents. This meant their strategies were recombined. The goal of recombination was to transfer good traits from two parents to a child. This created children whose strategies matched the average of their parents’ strategies. “Mutations could also occur, randomly changing values in the strategies of each AI player. Through these evolutionary processes, new strategies emerged that tended to improve over time,” says Janetzki. At the end of the evolution stood Alpha-Qwixx.

Alpha-Qwixx focuses on many crosses and long games

Alpha-Qwixx focuses on long games. This means the AI tries to extract as many points as possible from the dice results rather than ending the game quickly with few points. The AI also generally aims to place as many crosses as possible in each row while staying as far left as possible, i.e. keeping gaps small. “If the score sheet is relatively empty, Alpha-Qwixx will risk a penalty roll for gaps of around three spaces. If the game is more advanced, it’s no longer that straightforward, and Alpha-Qwixx’s risk tolerance depends on the situation,” says Janetzki.

In her opinion, humans can copy the Alpha-Qwixx strategy and play at the same level. “Alpha-Qwixx always makes decisions following the same pattern. Each of these decisions can be worked out by recalculating. Since the Alpha-Qwixx strategy doesn’t have many values, it’s very manageable. This makes it relatively easy to evaluate hypothetical moves using this calculation method.”

Code can be modified

Alpha-Qwixx was created using Python. “The programming language has several advantages, including being object-oriented, modern, highly readable, and one of the most commonly used languages in machine learning,” says Janetzki. She has published the code for her project at github.com/sjanetzki/qwixx-trainer. Anyone can continue working on it or use the code as a basis for new projects.

By the way: This isn’t Janetzki’s first competition appearance with her Qwixx AI. As a fourth-grader, the researcher already took part in ‘Schüler experimentieren’. Back then, in 2013, she won first prize in Physics with a mirror in which you don’t see a reversed image.

Qwixx: More than just a filler
Sometimes it’s the small things that bring great fun. Like the dice game Qwixx. The box measures 13 by 10 centimetres, making it only slightly larger than a Reclam booklet. Open it and you’ll find a score pad and six dice inside. That’s all designer Steffen Benndorf needs for his brilliant game. The rules are quickly learned. We mark numbers in four colourful rows. In the red and yellow rows, the numbers are in ascending order, from two to twelve. In the green and blue rows, they’re in descending order, from twelve to two. We can only mark a number if there’s no cross to the right of it in the row. We move our crosses from left to right, so to speak. The more crosses in a row, the more points we score. But the dice don’t always roll the numbers we want. What to do? Dare to leave a gap and, after the blue ten, skip the nine and eight to mark the blue seven? Everyone at the table ponders such questions. Everyone is constantly involved. “Take risks or play it safe? The fast-paced mix of luck and tactics has the potential to become a long-term favourite – especially since it fits in any travel bag,” writes the Spiel des Jahres jury. The expert journalists nominated Qwixx for “Spiel des Jahres 2013”. Even though the small Qwixx didn’t win the title in the end, it rightly had its big moment at the awards ceremony.

Foto: Susann Janetzki
Photo: Susann Janetzki

#Wissenschaft#Würfelspiel

Source: https://kulturgutspiel.de/en/science/artificial-intelligence-beats-humans-at-dice-game-qwixx

No comments

Leave a comment

Comments appear once approved. Your email address will not be published.