Use tabletopgames.ai’s open source TAG and PyTAG frameworks to apply Statistical Forward Planning and Deep Reinforcement Learning to two board games of our own design. On an all-green, all-open source, all-AWS stack!
Results: Infrastructure Achievements
We successfully built and automated a containerized stack to support our AI experiments. This included:
- a Fully-Automated, One-Command, GPU-accelerated Kubernetes setup: we created an OpenTofu based script, tofu-tag, to deploy SUSE's RKE2 Kubernetes running on CUDA-enabled nodes in AWS, powered by openSUSE with GPU drivers and gpu-operator
- Containerization of the TAG and PyTAG frameworks: TAG (Tabletop AI Games) and PyTAG were patched for seamless deployment in containerized environments. We automated the container image creation process with GitHub Actions. Our forks (PRs upstream upcoming):
./deploy.sh
and voilà - Kubernetes running PyTAG (k9s
, above) with GPU acceleration (nvtop
, below)
Results: Game Design Insights
Our project focused on modeling and analyzing two card games of our own design within the TAG framework:
- Game Modeling: We implemented models for Dario's "Bamboo" and Silvio's "Totoro" and "R3" games, enabling AI agents to play thousands of games ...in minutes!
- AI-driven optimization: By analyzing statistical data on moves, strategies, and outcomes, we iteratively tweaked the game mechanics and rules to achieve better balance and player engagement.
- Advanced analytics: Leveraging AI agents with Monte Carlo Tree Search (MCTS) and random action selection, we compared performance metrics to identify optimal strategies and uncover opportunities for game refinement .
- more about Bamboo on Dario's site
- more about R3 on Silvio's site (italian, translation coming)
- more about Totoro on Silvio's site
A family picture of our card games in progress. From the top: Bamboo, Totoro, R3
Results: Learning, Collaboration, and Innovation
Beyond technical accomplishments, the project showcased innovative approaches to coding, learning, and teamwork:
- "Trio programming" with AI assistance: Our "trio programming" approach—two developers and GitHub Copilot—was a standout success, especially in handling slightly-repetitive but not-quite-exactly-copypaste tasks. Java as a language tends to be verbose and we found it to be fitting particularly well.
- AI tools for reporting and documentation: We extensively used AI chatbots to streamline writing and reporting. (Including writing this report! ...but this note was added manually during edit!)
- GPU compute expertise: Overcoming challenges with CUDA drivers and cloud infrastructure deepened our understanding of GPU-accelerated workloads in the open-source ecosystem.
- Game design as a learning platform: By blending AI techniques with creative game design, we learned not only about AI strategies but also about making games fun, engaging, and balanced.
Last but not least we had a lot of fun! ...and this was definitely not a chatbot generated line!
The Context: AI + Board Games
Board games have long been fertile ground for AI innovation, pushing the boundaries of capabilities such as strategy, adaptability, and real-time decision-making - from Deep Blue's chess mastery to AlphaZero’s domination of Go. Games aren’t just fun: they’re complex, dynamic problems that often mirror real-world challenges, making them interesting from an engineering perspective.
As avid board gamers, aspiring board game designers, and engineers with careers in open source infrastructure, we’re excited to dive into the latest AI techniques first-hand.
Our goal is to develop an all-open-source, all-green AWS-based stack powered by some serious hardware to drive our board game experiments forward!
Our Motivation
We believe hands-on experimentation is the best teacher.
Combining our engineering backgrounds with our passion for board games, we’ll explore AI in a way that’s both challenging and creatively rewarding. Our ultimate goal? To hack an AI agent that’s as strategic and adaptable as a real human opponent (if not better!) — and to leverage it to design even better games... for humans to play!
Silvio Moioli & Dario Leidi
Looking for hackers with the skills:
ai suse deeplearning python java kubernetes terraform containers amazon aws sles games gamedesign boardgames
This project is part of:
Hack Week 24
Activity
Comments
-
6 months ago by moio | Reply
Day 1: infrastructure work
- Silvio: focused on creating AWS/RKE2 Tofu scripts to deploy the Kubernetes infrastructure
- Dario: focused on containerizing the TAG framework (Java part)
Results:
- https://github.com/moio/tofu-tag/ the tofu-tag repo to deploy SUSE AI infrastructure in AWS
- https://github.com/moio/TabletopGames/releases/tag/v1.0.0 first containerized release of TAG
-
6 months ago by moio | Reply
Day 2: modeling Bamboo
- Silvio and Dario paired to implement a TAG model of Dario's card game "Bamboo"
Results:
- https://github.com/moio/TabletopGames/commit/d1430cd6173c51756cd6694e13f3a3f59f8ef0ce a first implementation of Bamboo was created and runs against an MCTS AI agent
- metrics from some tens of executions have been analyzed and some bugs were fixed. We are still suspicious others lie behind the surface. More work tomorrow on finding out whether the metrics are actually correct or we have bugs
- a problem was found in tofu-tag, CUDA does not seem to work correctly. More investigation needed
-
6 months ago by moio | Reply
Day 3: refining
- Silvio: worked around the CUDA problem in tofu-tag. Seems like an early bug in openSUSE and SLES, which hasn't made it to SLE Micro yet, was found and reported! All works now
- Silvio: also worked a bit on TAG metrics for another simple game "Totoro". Approach seems to be working
- Dario fixed an embarassing bug in yesterday's "Bamboo" implementation and started working on balance
Next up: implement the next game!
-
6 months ago by moio | Reply
Day 4: modeling R3
- Silvio and Dario paired to refine a TAG model of Silvio's card game "Totoro" and came to the definition of a "hard mode" for the game by comparing play statistics of an AI (MCTS) against a player choosing actions at random
- Silvio and Dario paired to implement a TAG model of Silvio's card game "R3" - much more complex than the previous ones, but still manageable. The first implementation works, more work is needed to extract the right metrics and balance
Results:
- more commits on https://github.com/moio/TabletopGames/branch/hackweek24
Manuals + pictures of the three games modeled so far are upcoming! Stay tuned.
-
5 months ago by moio | Reply
Day 5: Kubernetes, drivers, CUDA, oh my!
- Silvio and Dario paired with the objective to run PyTAG, CUDA-accelerated via PyTorch, on the infrastructure defined in day 1. We started on Dario's host, to align bits before adding AWS, Kubernetes and containerization into the mix - and found quite some Python packaging challenges before hitting a wall on hardware support (graphic card was a bit too old). Ultimately we tried again on AWS via tofu-tag and things worked!
Results:
- more commits on our fork of TAG - Java packaging bits to make Python packaging easier
- more commits on our fork of PyTAG - Python packaging and container building (including GitHub Action automation)
- final bits on tofu-tag to tie it all together.
It was a great HackWeek and we had a lot of fun!
Similar Projects
This project is one of its kind!