Board game emulation

I’ve developed one of my board game manias for Through the Ages. I haven’t had it this bad since the Scepter of Zavandor. (btw, I am _so_ over Scepter) I can tell I get a little off-putting with my enthusiasm. Especially since both games take hours to play. In order to work this mania out in a less irksome way, I’m thinking of writing an electronic version of the game. This brings up a couple technical questions, and a significant legal question.

Technical Questions

A major challenge of this would be trying to write an AI. I could either try hard encoding my strategy theories, or some sort of machine learning process. The first sounds like it would be woefully inadequate and probably uninteresting. The latter sounds like it could be both difficult and potentially lead to frequently handing my ass to myself by proxy, without being educational as to what approaches work better. Input from the video game programmers who occasionally read this blog would be most welcome.

Assuming the AI wasn’t ass-slow, it’d probably also be much faster than playing with humans, because a) the computer would handle the fiddly bits and b) I’d be the only one taking my time to make a decision.

The programming language I know best is C (though it has been years since I wrote anything of substance in it). But, not knowing any libraries for such, I’d imagine it would not be good for creating visuals. My understanding is that Java would work better on that front (and as an added bonus be cross-platform compatible), but be perhaps somewhat slow/inefficient for the actual guts of the programming. Since it is not too very distant from C in form, I could see that.

Legal Question

I’m also somewhat concerned about the legalities. I was told by some non-lawyer geek friends of mine that board game copyright is about the art, not the rules. I do not want to publish the game, just play it by myself at home. I couldn’t care less about the art; I have no desire to copy it. I just want to replicate the mechanics of the game. (though I have some ideas for different games, some even inspired by this one, that’s not the point here).

This obviously wouldn’t really get started until May. (Other ideas for pastimes include learning spanish, camping, and reviving my failing athleticism, but those are more expensive and higher effort 😉

7 thoughts on “Board game emulation”

  1. There are lots and lots of books on AI.

    And Java is probably your best bet if you’re unfamiliar with C. VB is muy easy to deal with the basic graphics required though.

  2. I’ve tried writing some computation-heavy programs in Java. In some cases the performance was comparable to C++. I wouldn’t worry about that aspect.

  3. On the legality issue… I only have an anecdotal response. I can not tell the difference between pioneers and Settlers, and that open source program is part of Debian and has been around for many years.

  4. Ignoring the AI for the moment, there is no way you could write the engine inefficiently enough to make a difference in Java. Rehana and I have some horrendously bad algorithms in the Antiquity implementation (the zone of control code, which is more computationally complex than anything in Through the Ages, isn’t doing any caching), and it still runs just fine on my six-year-old desktop.

  5. Java is fine for this. The last several versions are roughly the same performance as you’d get in C.

    I’m not sure about doing the graphics in it though. Depending on the client this is going to run on, and what kind of graphics you want, you might be better off going native for the graphics. So if this was to run on a Wintel platform, maybe C#.

  6. If you’re going to learn another language to do this in anyway, I suggest Python. It’s got bindings for all the important GUI libraries, and it’s way more flexible than Java or C for rapid development. If it turns out to be “too slow”, you can use an optimizer like Psycho or rewrite key subroutines in C.

    As for strategy, I don’t know what the right approach is, here. It’s a stochastic game, which means that knowledge of probabilities and Bayesian reasoning algorithms will be useful; these are also the kinds of strategies that are best suited to machine-learning.

  7. I am not a lawyer, but I am intrigued by the intricacies of IP law and regularly follow Techdirt, which is heavy on discussion around IP law. By my understanding, creating a game for you to play by yourself would fall under the fair use doctrine. Distribution of that game would not, even if your distribution was not for commercial gain. The makers of the wildly-popular Facebook app called “Scrabulous” (which, as you might expect, was an implementation of Scrabble) were sued by Hasboro (owners of Scrabble), and most commentators seem to agree that while it’s probably a stupid move on Hasboro’s part (why not try to make a commercial deal with the Scrabulous folks rather than try to shut down a very popular implementation of their aged board game??) — it is well within Hasboro’s rights to do so. Bad business move, but legally proper.

Leave a Reply

Your email address will not be published. Required fields are marked *