Powargrid
  • Home
  • Blog
  • Buy
  • Demo
  • Media
  • Press
  • The Daily Blobbie
  • Blobbie Meme Maker
  • Forums

Our Skirmish AI is a Space Elevator

25/4/2014

0 Comments

 
Picture
Michiel told you about the development of our Skirmish AI here and here. In this post, I'll take a look from a higher vantage point. Climbing an actual space elevator would help me do that, but with a distinct lack of such devices on this little planet of ours, I'll have take that look in a non-literal way.

In "The Science of Discworld", Terry Pratchett, Ian Stewart and Jack Cohen used the space elevator* as an analogy for any process or technology that lifts a system to a new level of operation. So in that vein, the printing press, the internet and RNA are all space elevators. Being big Pratchett fans, this added use for the term space elevator stuck with Michiel and me.
Picture
So why is our Skirmish AI a space elevator in that sense? It started out as a nice first experiment in building an AI that could play Powargrid at a basic level. But since working on an AI is fun**, we happily kept adding bits of logic to it. And at one point the Skirmish AI became a computer opponent that was no longer trivial to beat, which was cool. It was at this point that we developed what you could call a Powargrid sub-hobby: watching AI versus AI matches on a skirmish map. This is also what inspired us to have an AI battle as the background for the main menu in Powargrid.
Before we got to the point where the Skirmish AI became good, we'd been working on the first three missions of the campaign. Each of those missions had a simple AI to take care of the enemy turns, so they were playable in a rudimentary way. But with our new best friend the Skirmish AI, I could suddenly drop an actual opponent into any level I designed. So I could simply think of an interesting layout for the game grid, combine it with a setup for the player and enemy bases that I thought would provide a nice challenge and then immediately test it.
And believe you me when I say that's a big step up from thinking of a mission in my head, sketching it out on paper and then asking Michiel to painstakingly code it into reality before testing whether the mission is actually any fun. This was certainly a new level of operation for mission design, so we feel that our Skirmish AI qualifies as a space elevator in the Pratchett-Stewart-Cohen sense of the word :).
Some of those missions are already in our playable alpha and others are lined up for use in later missions. And we have more mission concepts we think are fun to play, but we had to pick and choose in order to keep the campaign at an interesting length (and to be able to ever to finish this game ;).
For most missions, we do write a subclass for the AI, to handle specific aspects like Swap attacking the dam in 'Dam It' and Ford attacking the temple wall in 'Welcome to the Jungle'. An interesting case came up in 'Piece of Paradise', where you have two opponents in one team. Since team members can't damage each other's buildings, there is a possibility that one AI blocks the other. This takes the fun out of the mission, so we had to prevent that from happening. The best approach from a level design standpoint turned out to be simply have each AI leave a path for the other AI. I defined a this path but then found out that I couldn't feed a set of forbidden tiles into our pathfinder. So I called in Michiel's help and we ended up changing the Skirmish AI to accommodate these forbidden tiles. We usually shy away from changing the Skirmish AI, but it was clearly the best way to implement this. The change is also general enough that we may use it in more missions.
Picture
The tiles where yellow has built along the water are forbidden for the green AI.
The reason we shy away from changing things in the Skirmish AI is that it may affect other missions. We're quite happy with the difficulty level of the campaign, and we wouldn't want to throw it off balance by further optimizations to the AI. By now, we only change the Skirmish AI if we're sure it won't get any meaner or if it behaves stupid or silly in a non-human way. We'll probably have to branch the Skirmish AI in the future, since there are certainly things we'd still like to improve. A really nice improvement would be to teach the AI to be smarter about claiming territory by making use of bottlenecks in the play field, but that's going to be a tough nut to crack.
The last thing I'd like to say about this subject (for now) is that we plan to create an interface through which you can build your own Powargrid AI. We think it's huge fun to do so. It's not too hard to build an AI that plays the game in a (semi) sensible manner and seeing it get better with every tweak keeps you hungry for more improvements. The only risk I see is that if others do build AIs for Powargrid, the time Michiel and I spend just watching AI battles will see a significant increase. Which would eat into Powargrid development time. But I think that's a risk we're willing to take ;).
Well, that was that. We hope you enjoyed our little series on AI building. I think we'll have more to say on this subject in the future. In the meantime, be sure to let us know if you'd like to know more!

- Willem -

* A space elevator is a really interesting concept that would make bringing stuff up into space orders of magnitude cheaper than it is now (in energy and likely also in money).
** We once participated in an AI building contest for Open TTD, where we built a very mean AI together with our good friends Otto and Marnix.
0 Comments



Leave a Reply.

    Author

    We're Michiel and Willem. Hi!
    This blog is about the development of Powargrid and our experiences in doing so.

    Archives

    June 2017
    May 2017
    November 2016
    October 2016
    September 2016
    July 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    March 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    September 2012
    August 2012

    Categories

    All
    Game Design
    Marketing
    Progress
    Slacking
    Tech

    RSS Feed

© Wee Free Studio | Steam | Twitter | Facebook | RSS feed | Press | Contact