Adapting some of my favorite board games

I greatly enjoy playing board games. My board game collection numbers over 80. And some of my favorite board games are about trains.

A certain board game series called Iron Rails is one of my favorites because these games have an equal measure of being able to be very analytical about the game state, as well as “play the players, not the game”.

Iron Rail Board game series

The general idea here is that train companies are creating networks to connect up cities, which then generates profit for any players who own a share of the company. One or more players may each have a stake in the same train company. Multiple train companies existing makes it possible for players to pick and choose which train companies they will invest in to support or to sabotage.

Here is an almost complete game of Iberian Gauge with three players.

Iberian Gauge board game almost done

The Goal

I would like to adapt these board games to the computer so that I can play them whenever I want, and that requires creation of AI players. Having these games on my laptop would be quite convenient when traveling.

I have seen a ruleset for at least Irish Gauge to play solo variants of the board game against randomized bots. But it lacks something of the cunning moves that a human player would adapt to any changing scenario.

The First Game Adaptation

Of these three above, the game I know the best is Irish Gauge and that’s where I have started.

I have selected the Go language with the Ebiten 2d game library for no adequate explanation beyond the examples page was easy to understand and had relevant examples.

These games primarily operate on a hex grid system, and so I am leveraging the explanations of Red Blob Games’ Hexagonal Grids to get the math working. I’ll touch more on that in a later post when I start getting AI working.

At the moment, I have some backing data structures to represent the tiles, the map grid, the interest cube tokens, and the companies. But these data structures are very much in flux and changing, so I’ll leave explaining the internals for a later post.

In the meantime, here’s a screenshot of most of the game’s map initial setup. Everything shown on screen is entirely triangles so far with no images. Zooming in and out is the only interactivity available at this moment.

Irish Gauge's almost starting setup done on the computer

For comparison, here’s the physical setup excepting players for a game of Irish Gauge.

Irish Gauge Game Setup only

Cross-platform

I am typing this blog post and running this example on openSUSE Tumbleweed working perfectly fine. I have also developed on this for Windows 10 also with no difficulty.

Neofetch screen capture

Summary

I want to play my board games even when there isn’t people around, so I’m making a digital adaptation and working on AI to make a challenge.