B-B-B-Battleline

Its no secret that I like board games.  It’s one of my go to timekillers.  Settlers of Catan, Dominion, Agricola; I’m a sucker for Eurogames.  I play with a few friends from work from time to time, and over time, we started trying to learn things together.  We set up a software book club, and that eventually morphed into an AI learning club.  We joined The AI Games, and had a blast with it, but then decided to see if we could take a crack at something similar for our private group.

We decided to start trying out some board games we knew.  We wanted to build an engine that allowed bots to play the game against each other.  The engine would run all the rules and coordinate communication, and each bot would supply the moves.   One of us mentioned a two player game called Battle Line,  designed by Reiner Knizia and we decided to go for it.

I had written an Elixir bot for the AI Games, and wanted to try again with Battle Line.  I had used metaprogramming to set up a simple engine, and it definitely made it so that I could spin up a strategy quickly.

Continue reading

Advertisements

In With the New

Well, it’s been a long time since I last wrote a post.  I knew this would happen, where I would take forever to write, and then life would get in the way (Not that that’s a bad thing).  But I’m back, and I have some news.

Since I last wrote, I was able to make a successful Warlight bot in Elixir.  I really liked Elixir (it might be my favorite language, but I use Python so much more that it will be tough).

Then at work, we decided to write some AI for boardgames we played, and I had a chance to do more in Elixir.  I got to play around with metaprogramming (templated out a game engine), which was one of my goals.  Growing up with C++ macros and hating them, I was hesitant, but once I understood that they were AST macros, and not  preprocessor text search and replace, something clicked, and I appreciated them.

I have no idea if how I wrote the code was good or not, but I got to learn something, and that’s what matters to me.  It matters a lot.

Continue reading