What is AI?
In the last weeks this question took centre stage in more ways than I imagined.
First, we have an ongoing discussion how to explain the value of the technology to people who don't understand the intricacies of 4X strategy games, or even better to people who don't know much about video games at all.
One aspect that is universally understood is time. If you can show that you can do something in a fraction of the time you needed before, it is a clear gain. While this is good enough to make people curious, if it comes to strategy games, it doesn't absolve you of the burden to show that the behaviour of the AI that works faster is also at least of the same quality as that of the slower AI.
AI is a vast field. Naturally, with so many possible applications it should be possible to pick one to demonstrate what the breakthrough of true AI is. Something that becomes feasible that wasn't before. The only caveat is, it requires you to implement a full AI application to prove it. It took already a number of years to implement the AI for Heroes V, so it is logical to use it as a showcase.
How do you demonstrate AI?
Intuitively we would think first about what the computer opponents do in the game. Are they doing something smart, something efficient, or something otherwise convincing? If you go over these questions, one thing you notice is these are full of generalisations. So we are looking for general qualities, that are universally applicable, to become visible in a very specific setting, our 4X game. It seems we are truly after a universal quality. Trying our outmost to make it visible is possibly not the way to go. Sometimes you have to be self-critical regarding the tools of your choice.
Some things are so universal that it becomes very difficult to descibe these with specifics. How do you describe a spectacular goal in football (soccer for you Americans), what is it that makes it so great, to someone who hasn't seen a football match before? And yet, it doesn't require any beforehand knowledge, if you watch your first football match and witness a feat like Maradona's greatest goal, you understand instantaneously that it requires an exceptional performance.
Maybe we are asking our question the wrong way. Maybe we put an undue focus on the artificial. What we are truly asking is what is the essence of intelligence. It is evident in so many details. Take for example someone opening a banana who has the knack for it and opens it with a deft flick of the hand, peels the skin away and eats it a second later. Compare this to someone who tries to peel it with a knive. Or take the case of someone cracking a nut expertly and someone labouring with it for a minute. In the first case you will say, this one is smart or has the necessary experience. But in truth it is a form of intelligence, either intuitive or learned.
Intelligence can take many forms. It is most obvious is its intellectual form, like someone telling you the solution to a mathematical equation. The acquisition of a skill is also a form of intelligence that has been obtained from learning or experience, for instance the skills of a craftsman. The way a plant sprouts its leaves is a form of intelligence as well that has been shaped by genetic adaptation over millions of years. Even the cells in your body are.
But all these forms of intelligence have one thing in common: you usually can notice whether something behaves intelligently or skillfully. If you observe something in nature where you are not sure what it is good for, you usually can, looking deeper, find a reason why it is the way it is.
The key takeway from this is in most cases intelligence is fairly obvious to spot. It is kind of self-evident. In our case it means, our AI for a 4X game has to be good enough doing what it needs to do so that it can be clearly recognized as intelligent. This is also the bar it has to pass.
How AI is seen today
A good deal of our trouble to spell out this simple fact stems from the approach how software, particularly games, currently go about AI design.
Technically they mimic specific features, like ducking behind cover, or attacking opponents with the highest threat vs defense rating, in order to give the players the impression of intelligent behaviour. But it is all surface, if you peel away the outer layer, this behaviour hardly adapts to changing contexts beyond heuristics. There is no concept of an AI directing a computer player's entire behaviour.
So it was only logical that people asked what is the difference between your AI and what is already there. They technically ask for the features that are implemented additionally, beyond the heuristics and cheats.
This is ingrained in the mindset of people regardless of whether they work on a game or visit our discord server to discuss expected AI behaviour. I can't blame them, because this is how AI is treated currently. Even neural network AI is seen as an approximation to an intended behaviour with some features and flaws that coexist.
What if...
What if we had indeed an AI that isn't only a collection of heuristics and features but an entity with its own distinct behaviour?
This is obviously the ultimate goal.
This project is a stepping stone towards it. It is unique in the world, a first, that we implement rules/mechanics and then have an AI use these rules to produce a behaviour.
This is what I am currently implementing for Heroes V. It is a vast game in terms of rules and game mechanics, but during the last years most of these have been already implemented.
If you so will, what so far has been implemented as AI is very much in the old vein, implemented rules + a very strong lookahead + a good strategic valuation heuristic. But it has been implemented in such a way that it serves the transition to the next level.
The next milestone on the roadmap is named strategic planning. But in practice it means an upgrade of the AI to survey the entire map (and state of the game) and use the rules to arrive at a logical sequence of actions. It does away with valuation heuristics in the traditional sense. Instead the AI will simply play to achieve victory and assign values to individual actions on the map itself.
We leave the present notion of what AI is behind.
Instead an AI is an entity that has knowledge of the rules and a goal to arrive at a logical behaviour.
Naturally this implies that the AI can adapt to any context that the rule space allows.
If we succeed you can witness first hand whether the AI acts intelligently or not. Games like Heroes of Might & Magic and Master of Orion represent their own game world, with most of the game's objects and rules having real-world equivalents. So you can simply use your intuition to judge what you experience first hand in these games.
As there are usually many more possibilities and paths than even experienced players are aware of, a good AI should be able to surprise you and offer lessons that you could learn from.
This is what is behind the milestone strategic planning. There is still work to be done, but it is the next one.