Emergent AI In an Indie RTS Game 146
x4000 writes "My recent RTS game uses a new style of AI that hybridizes rules-based AI with emergent AI logic. As a disclaimer, I'm really not an AI programmer at all — my background is in databases, financial modeling, etc. But it just so happens that database experience, which often involved distilling data points from multiple sources and then combining them into suggested decisions for executives, also makes a great foundation for certain styles of AI. The approach I came up with leans heavily on my database background, and what concepts I am familiar with from reading a bit about AI theory (emergent behavior, fuzzy logic, etc). The results are startlingly good. Total development time on the AI was less than 3 months, and its use of tactics is some of the best in the RTS genre. I'm very open to talking about anything and everything to do with the design I used, as I think it's a viable new approach to AI to explore in games, and I'd like to see other developers potentially carry it even further."
Summary useless (Score:5, Informative)
Add some flaws. (Score:5, Informative)
I'll ignore the shameless plug.
Ever since I wrote my first connect 4 game in the 80s - and was totally thrashed by it, I never beat it - its been clear to me that the trick is to degrade a computer player in most circumstances to the level that it appears to have human flaws and play in a more human fashion.
Of course this logic only goes so far and some games require a search space so vast or a completely different programming model that even now a computer cannot beat a competent real human (Go is an excellent example of this).
The point is that it is easy to program a computer to win, the hard part is to program is lose convincingly.
Re:All their art is stolen. (Score:4, Informative)
I quote "the graphics have been made available under an open license in April 2007" http://en.wikipedia.org/wiki/Tyrian_(computer_game) so how are they stolen?
Re:Add some flaws. (Score:4, Informative)
http://en.wikipedia.org/wiki/Solved_game
Emphasis mine.
Master of Orion (Score:3, Informative)
I have yet to see anything that beats Master of Orion's AI
But to be fair I've played very few strategy games in the last 10 years, so shoot me down if I'm talking out my arse :)
In MOO the AI would recognise your tactics, and make moves specifically to counter them. You couldn't keep using a winning strategy.
A good tactic early in the game was to build a large number (thousands) of tiny cheap ships loaded to the brim with MIRV missiles which would overwhelm the defences of the far larger, well equipped and expensive enemy ships.
The AI would then counter by building a large number of small defensive ships, and equipping ships with ECM units, displacement devices etc which made missiles ineffective.
Man that game was good. Perfect blend of simple gameplay and deep strategy. I've never played anything else as good, modern 4x space games all seem to be about micromanagement.
Re:Summary useless (Score:3, Informative)
Diablo series uses heuristics, pure and simple. Each unit has a set behaviour rule, with no adaptive whatsoever.
Re:Summary useless (Score:5, Informative)
Re:Like to see.... (Score:2, Informative)
Re:All their art is stolen. (Score:2, Informative)
Re:Like to see.... (Score:5, Informative)
Re:"Truer" AI suggestion (Score:3, Informative)
I'm sure I will experiment around with this more in the future, but I bet you somebody else builds on my approach and does something more impressive before I even can. Anyway, future articles in my aI series will go more in-depth and will also include relevant code snippets to help illustrate my points. Feel free to use and abuse them, and expand away.
The second article is now up, to appease those hungry for some source code and a bit more of an in-depth discussion on a couple of sub-topics: Designing Emergent AI, Part 2: Queries and Code [blogspot.com].
Re:"Truer" AI suggestion (Score:2, Informative)