Space Generals

Hi all!

It’s been more than 4 months since my last post! I’ve been really busy lately creating a website for a game called Space Generals which we are going to use for our research in game AI. The game itself is actually a turn-based one much in the style of Risk with a little twist which will allow us to study hierarchical AI and domain-specific embedded scripting languages. The website’s front-end is developed in Java using the GWT framework while its back-end, which carries out turn-processing and game-logic, is developed in Haskell. Here are some screenshots of the game:

More information about the game and how to play can be found in the User Manual.

Feel free to register and play the game. You need at least one more friend to play a game and up to 5 players can play together.  Also, if possible report any errors and provide suggestions using the game’s:

Email Address


Facebook Group

Also, it would be of great interest to us for you to share your game-playing strategies using the above methods as we shall be using them to create different AIs using the DSEL we are working on at the moment.

Thanks! We hope you enjoy the game!

P.S. Currently only Mozilla Firefox and Google Chrome are supported.

Paper: A Domain-Specific Embedded Language Approach for the Scripting of Game Artificial Intelligence

Yet again I have ignored this blog for quite some time – I’ve been really busy with an implementation of a game involving a Haskell back-end/Google Web Toolkit front-end (more on this in a future post)  and other deadlines. Anyways I thought I’d share more info on how 4Blocks’ AI was implemented using a DSL embedded in Haskell:

A Domain-Specific Embedded Language Approach for the Scripting of Game Artificial Intelligence, with Gordon Pace, in the Proceedings of the University of Malta Workshop in ICT (WICT’09), 2009.

More info on WICT can be found here. Co-incidentally thanks to Dr Pace’s Erdös Number of 4 I get to have one of at most 5. 🙂 Hope this short paper provides with some interesting lightweight reading. Also, any feedback is greatly appreciated!

4Blocks with AI

I’ve been wanting to write another blog post on the series on DSELs I’ve been planning, but I’ve been really swamped with work lately. So once more I’ll post a video or two on something I’ve been working on. It’s the 4blocks game again, this time playing on its own with an AI I’ve written for it. Here are the videos:

On the whole these were two good runs. I’ve had much better and much worse runs of course.

The AI is by no means perfect but it uses the DSEL techniques in Haskell. I have two languages acting here:
1. A Tetris DSEL
2. Haskell acting as a meta-language over the Tetris DSEL.

What is happening is that for every new brick the game state is queried by Haskell for certain information such as occupied blocks or number of lines. Using this information, by means of Haskell’s case statement I simply trigger one of a possible number of strategies. These strategies acquire certain information from the game state and generate a DSEL script. This script is then carried out by a DSEL script interpreter.

There are numerous problems with the AI and its mostly because I haven’t had time to write more strategies or a more intelligent way to select what according to the selected strategy is the best final brick destination.

That’s about it for now. Let me know what you think.