The ATG Single Player Experience
This post talks about what it says it will but through the prism of my mod, The Enhanced Resource Mod (ERM). Not much I can do about that as the two are, at least from my perspective, intertwined. I’ve endeavoured to keep it as general as I can and, without any knowledge or interest in the mod, you should still find it a thought provoking read.
The conversation is about single player ATG random games. I’ve focused on this as it is here is that the game really shines as an every changing, operational level war game. It’s also, by far, the area of greatest use for owners of the program.
In purely self-interested terms ATG likely won’t be given much in the way of further development attention unless there is some growth in the user base. While not denigrating the small, but enthusiastic, MP community here in anyway it is the single player experience that sells this, and most other, games.
Before anybody gets on their high horse and starts yelling at me I’ll point out that I’m agnostic. Both forms of the game are good. In the last three years there have been a number of interesting surveys done by game companies to evaluate the relative importance of MP & SP experiences. Turns out that lots of game players like the idea of MP features but surprisingly few of them actually use it beyond, at the most, a cursory initial look.
As mentioned it is the quality of the Single Player experience that gets them reaching for their wallet and it is here that the overwhelming majority of game owners spend their time.
Anyway, enough of that. I’ll talk about the limitations of the AI, the chances of it ever being officially improved and analyse what else can be done to improve the gaming experience.
Why can’t the Developer fix the AI?
I’m sure that he’d like to. He’s an obliging gentleman. Lots of people here on the forum have asked that he does. Even something straightforward like a sliding difficulty scale for the AI (rather than the fixed AI, AI+, AI++ levels that currently exist), which has been suggested by just about everyman and his dog at one time or another, has yet to be implemented. So what’s the problem?
Rather than me talk about an area that I know little about I’ll paraphrase from the words of the developer himself, Vic (you can find a more detailed version on his blog).
“For a game to feature a decent AI opponent you need to build the game from the ground up around the requirements of an intelligent AI.”
“Like most things in life you don’t get it right the first time. The more games you make, the better you get at it.”
The core code base for ATG is old. Vic has made several games since with much improved AI. Which pretty much sums up why the AI isn’t going to ever be magically fixed by requests for the developer to do so. It is what it is.
I don’t in anyway speak for the developer and the above comments are my educated guess as to the why and how. If I’ve got it wrong it would be appreciated if he could step in and correct me.
From a more holistic viewpoint writing an improved AI for random games would be extremely difficult, even assuming it was technically doable.
Historical based games (eg. the DC series) have the advantage of fixed geography whereas random games could range from anything from totally flat, land based worlds to scattered archipelagos of mountainous, jungle clad islands. Imagine trying to write generic AI rules to cope with such overwhelming diversity?
The best example of a Single Player computer AI that I can think of is the Stardock game, Galactic Civilisations. If you translated this to the ATG format it would consist of nothing but cities in a sea of nothingness. There aren’t any mountain ranges, deserts, forests, meandering rivers or vast oceans to take into account, just a collection of cities, each a certain distance from the other.
Even without the encumbrance of a complicated random geography the GC AI has required multiple iterations to get to the point of being challenging. Add onto this the complexity of the ATG combat system compared to the simplistic rock paper scissors approach of GC and you can get an inkling of the size of the task.
Galactic Civilisations is inherently a collection of simple game mechanics dressed up in chrome to appear otherwise. It’s an excellent example of building a game from the ground up to cater for a decent AI. The simpler it is, the easier it is to code the AI and the more manageable the task. ATG is a collection of relatively complicated game mechanics, with minimal chrome, conducted on a randomised, complicated game board.
The surprise is not so much that the ATG AI is bad, rather that it is as good as it is despite all of the above hurdles.
Analysing the AI
The limitations of the AI are legion. It doesn’t know how to utilise the more specialised units. It ability to wage naval warfare wouldn’t qualify it to conquer your bathtub. It’s flaky about building effective units. It builds lots of factories but doesn’t know much about using them. It’s blind, deaf and dumb when it comes to the big strategic picture.
On the flip side it’s O.K with its tactical implementation. It’s good at sneaking units round your flanks and it will swarm you into extinction in the opening stages of the game if you aren’t paying full attention.
It’s easy to poke fun at the AI when you aren’t the person who has had to write it. I’m confident that if I had to put one together it would be dramatically worse.
The AI doesn’t exist in isolation. Supply is a significant limiting factor. Because only cities with a like people/culture to yours can produce supply there is a defined ceiling which limits the overall size of your armed forces.
This is a great design feature. It prevents the player from generating an overwhelmingly powerful force able to steamroll their way all the way to the far map edges in short order.
Once you start playing on large maps or upwards this becomes an issue as you attempt to conquer the farther reaches of the known realm. Unfortunately, if you’re like me, you’ve usually got bored (the challenge is gone) and stopped playing long before you get to this point.
The other stand out design element is the inclusion of resources. Pure genius. These only apply to the player (the AI gets resource handouts) and provide an immediate strategic focus. The location of the mines and oil wells on the map become increasingly important in direct proportion to your need for them. Without resources you would focus only on capturing cities. With resources you have a much broader appreciation of the world.
Locations with resources are strategically important. With the mod the transport routes from these outlying places become equally vital. Imagine if Japan in WW2 only had to capture Burma and the Dutch East Indies to have all their oil magically transported back to the Home Islands. Without the hassle of safely getting vulnerable oil tankers across vast ocean distances it would have made their job of conquering the Pacific basin magnitudes easier.
The Typical Game Arc
Goes something like this…
It varies considerably depending on how you have set up your game. The overall arc, however, is similar, all that changes is the time involved for the different stages. As can be seen the AI is at its best in the opening and tapers off rapidly during the middle game.
But while the AI’s performance is important it’s the challenge of the overall game that is probably more relevant to a player.
Challenge drops off faster than the AI’s performance. You can get a sense for this yourself. It’s easy to tell when you are at the apex of the graph - you have survived the initial AI ‘swarm’, you have established a strong foothold, have a factory or two starting to tick over and you are, for the first time, starting to think about where you will launch your first big offensive.
Once that gets under way the challenge aspect drops faster than the AI’s performance for the simple reason that you begin taking ground and cities. Slowly and painfully at first but there is a definite snowballing effect that kicks in and it isn’t long before you breach the ‘threshold’.
That’s the point where you are no longer making interesting decisions. You’re thinking, ‘I got this game beat, from here on in it’s only a prolonged, increasingly easy, mop up’. If you’re like me this is the point where you stand up, bow gracefully at your computer, mutter muted thanks for a great game and be done with it.
Enter stage right the Enhanced Resource Mod.
The effect is to increase the size of the initial challenge (‘cause it makes the game harder). In short, the challenge of the opening game is enhanced and extended. Doesn’t do anything for the middle game but it pushes the point where you stop playing further down the time scale.
The idea of the second stage of the mod is to do something about the middle game.
How best to improve the AI
While ATG’s AI isn’t ever going to take out ‘Opponent of the Year’ it does have one huge advantage over AI’s found in other games – the ATG editor. This is surprisingly powerful and allows anyone who is willing to invest a bit of time to add significant functionality to the game.
If you are going to do this with the intention of improving the AI you have a couple of options. The first is to pull the various hardcoded levers that manipulate the AI’s behavioural profile, the rulevars. There are also a few AI parameters that you can tweak via the scripting language.
I’ve looked at these, as have others, and come to the conclusion that, while you may well be able to optimise certain aspects of the AI in certain specific situations, none of what you can do would be enough to overcome the AI’s myopic view of the strategic situation. In short, it isn’t going to make much difference.
If there were any major gains to be had here I’m sure that the developer himself would have adjusted the settings long ago.
Another approach is to program the game such that the AI gains bonus units. Not so much more battalions of grunts but the special SFT’s such as aircraft and naval units. You can set it up such that the AI gains a new airfield of fighters, attached to the appropriate Headquarters, near a key city. Or perhaps insert a squadron of torpedo bombers in a coastal city to project airpower over the nearby sea lanes.
I’ve tried this and it’s eminently doable. The problem, however, is that once the AI has the extra units it struggles to use them in any manner other than in a purely reactive one. A good example is that I wanted the AI to wage a submarine war against my merchant shipping. I gave it whole flotillas of submarines, fully supplied, in its frontline coastal cities.
What I found was that I know more about waging a trade war (I have a whole shelf of books on the battle of the Atlantic and the War in the Pacific) than the AI. Heck, my daughter knows more about it than the AI and she can barely spell ‘submarine’.
So both the obvious approaches to improving the AI are dead ends. What does that leave?
Well one thing you can do is, rather than tweak the AI, make the player’s job harder. Give him a task that the AI doesn’t have to worry about. The net result will be better game.
This is tricky. Doing it is easy. Throw a bunch of random events at the player that nobble him one way or another, an approach that is commonly taken in a lot of 4X strategy games.
The downside to this approach is that the player has no control over what happens. You can dress it up as an essential part of the ‘backstory’ but all you are actually doing is getting people annoyed and frustrated.
What works instead is a game mechanism that handicaps the player, relative to the AI, that it is both enjoyable and allows the player a high measure of control over the process. You also don’t want to introduce any additional micromanagement.
Which is what I’ve done with the Resource Mod. The game mechanic introduced is that resources are only useable if the player can connect them to his capital via a series of rail and sea links.
Does the player have control over the process? Yes indeed. Is it fun? Who doesn’t like connecting stuff up and getting a ‘resource rush’ when that final piece of track is laid? Does it handicap the player compared to the AI? Yep. No additional fiddliness? Tick.
Should I give myself a pat on the back for being a great mod designer? No. I wasn’t thinking about any of this when I first wrote the mod. The only thought in my head was that it was pretty hooky being able to use resources if they weren’t connected.
It’s only recently that I’ve started giving the AI some serious consideration. It turns out that my approach was probably the right one but that was purely dumb luck, not good management.
Regardless, it worked out well and I’ve got a solid foundation to build on. Now that I’ve lucked my way into the finals and have my baseball cap on backwards I’ve figured out a few things.
I can both further handicap the player in the right way (eg. challenging and fun) and improve the AI at the same time. The key piece of the puzzle to enable all this to happen is to set up an off map ‘transport pool’ of trains and cargo ships that are dedicated to moving the players resources. You can read more about this in the Mod section of the forum if you’re interested.
The pool subtly increases the player’s handicap and provides a means for me to program the AI to attack it in an intelligent manner.
As the player is dependant on the trains and cargo ships within his transport pool to ferry his resources back to his capital any impact on the pool has significant repercussions in his ability to wage war.
Let’s say you generated a random game with the parameters of a large map with an ocean geography (e.g. islands in amongst a lot of ocean). The capital may as well be called Tokyo because your task is identical to Japan’s in WW2. You have to conquer distant lands for their resources and transport them back to your industrial homeland in the face of an unrelenting submarine campaign.
The only part that is missing is the submarine campaign. Well I can program the AI to wage one better than it can do so itself (which isn’t saying a lot).
All of this would be abstract. The transport pool is abstract, the AI submarines and their movements would be abstract. It would be a game mechanic that exists only in the form of reports and information updates.
Which is, by the way, pretty much how the two major submarine wars (Atlantic and Pacific) were fought. There aren’t any Panzer divisions that you can point to on the situation map and outflank in a submarine war. It’s a war of shadows. One that is conducted largely based on incomplete and inaccurate information.
Still, abstract game mechanics aren’t very satisfying. But what if you could somehow tie the abstract to the reality of what’s happening on the map?
Any participating units by the player, such as cargo ships and destroyers, would have to be built. Because transport pool assets now can’t be used for anything other than resources there is a distinct trade-off that the player needs to negotiate. Do they build cargo ships to put in their pool or, instead, cargo ships to move tanks across the oceans?
The vulnerability of a players convoy routes would be a function of their actual length. Short ocean crossings are easy to protect whereas running convoys from distant lands is going to be more problematic. There wouldn’t have been a Battle for the Atlantic if America’s industrial output derived from nearby Scotland.
The AI’s ability to support a submarine offensive would be in direct proportion to the number of coastal cities they own. The U-Boat offensive only really took off once the Germans gained access to the French Atlantic ports. The more coastal cities you let the AI take over, and the longer they control them, the more submarines they can field.
Then, of course, is the inevitable consequence of the player neglecting to tend to the protection of their sea lanes. Most of their cargo ships are going to be sitting on the bottom of the ocean with ragged holes in them. All those foreign resources. They’ll still be there, but they won’t be making it back to your capital where they can be utilised to feed your war machine.
That’s not abstract. That’s real. It’ll hurt.
I’m also confident that I can program the mod such that the general level of the AI submarine threat could translate to attacks against any of your on-map cargo ships. Due to the AI’s current lack of naval aptitude, sending assault formations to land on distant lands is a no-brainer. Load ‘em up and sail ‘em off.
Might not be so easy if there was the risk of being torpedoed en-route. Better send a destroyer, or two, with your cargo ships.
The above brief outline of the submarine war is just one aspect of the second part of the mod (not done, but underway). The Land side (rail) will work very differently along with a further mechanic to mesh both the Land and Sea aspects together into a coherent whole. I talk more about this below.
The key point is that by tying resource availability to a transport pool enables an AI that can target that same pool in an intelligent, proactive manner. The abstract nature of the ‘trade wars’ can be offset by heavily entwining the whole process with the on-map situation.
Finally the effects of the second part of the mod, eg. the ‘Trade Wars’, are designed to kick in just at the point where the player has got on top of the early game.
That’s the plan.
The aim is to provide the player with a roughly similar level of challenge that exists in the early game and continue it on through the middle game.
The end game is tricky. I don’t know of any game that has managed to keep the end game challenging. Usually you are either overwhelmingly ahead or likewise behind and on life support. It’s extremely difficult to put into place any balancing mechanisms that keep the player in the sweet spot where they are forced to make tough, interesting decisions. Not much I can do about this.
However, with a buffed up early game and challenging middle game, ATG could become a real contender as a single player experience. Fingers crossed.
The following post refers specifically to the mod and my plans for it. The general AI discussion part is finished so if you’ve got no interest in the mod, now is a good time to stop reading. If not then follow the link as the following is more suited to the Mod section of the forum.
ERM - plans for stage 2
< Message edited by lancer -- 1/15/2013 11:12:30 PM >