View Full Version : AI -- in the sky or in the tank?

04-01-2005, 10:54 AM
The thing I am most anxious to hear about is the philosophy in developing the AI. Truly, the visuals, the towns, the creatures, the campaigns, and all the rest matter little if the AI is not up to snuff.

Most of us noticed it in IV, but I had a sense that the AI had become subtly more forgiving going from II to III, and definitely from I to II. Really the original HOMM game put more pressure on the human player than any other turn based strategy game I can remember -- even if it did so by magically knowing the location and occupants of your towns. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

Two things seem to add to gradually weaker AI as time goes along:

1) The broader the audience, the less the average customer wants to have to think deeply in order to win. On general forums, I heard many people say that they liked the easiness of IV, even the initial release. Of course, these are people who buy a lot of games a year, play each for a few hours, and then move on. And they want a winning experience during that brief time. Those of us who want the game to still be a serious challenge after a hundred(s) of hours of gameplay have a whole different perspective.

2) The more complexities added to the game, the more difficult it is to write a good AI. A game that offers incredible depth of choice for the player sounds good when it goes on sale, and it may make for a great multiplayer experience, but if the AI cannot use the choices intelligently, it's going to wreck the game. This can come in two flavors: the fatal flaw and the generally brain dead. HOMM IV failed on both accounts -- the fatal flaw of losing AI heroes to independent armies, and the general brain dead lack of aggressiveness to provide meaningful competition.

The usual method of "difficulty levels" does not work very well because it is based on things like starting resources. Such a system makes the beginning of the game mor challenging, so there is a tense stretch when you know you are behind -- but you soon catch up, and the tension is gone for the last three quarters of the game. VERY few strategy games have avoided this.

So I am anxious to hear what this team has in mind. How do they plan to develop AI that reverses the sad trend in HOMM and return to a game that maintains tension beyond the opening weeks?

04-01-2005, 11:08 AM
The aI should be scalable.

From the N00b level to the Ultra-veteran-geek

04-02-2005, 04:58 AM
There should be one difficulty level, and that is "Self-Scaling". IMO, the best kind of AI is the kind that is always a tiny bit better than you, enough to draw you forward and keep you guessing, but not so much so that it becomes an excercise in frustration.

Nival keeps the game easy enough for people who are new to the HOMM series, while putting up a good fight against verteran players. WIN WIN situation!

The problem of "ok, I beat it on Insane... time to shelve the game" isn't as... problematic...

Pre-set diffiulty settings have the nasty habit of being TOO easy, or TOO hard. They also fill msg boards like this one with people screaming "I BEAT THE GAME AND IT WAS A JOKE" until it becomes obvious that said poster has never attempted anything above the -Hold my Hand- difficulty setting...

Nival should then proceed to bury any talk of "diffculty settings".

04-02-2005, 05:20 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by GodisanAtheist:
There should be one difficulty level, and that is "Self-Scaling". <HR></BLOCKQUOTE>

It would be fantastic, but who can write such AI? It is just a step away from creative AI who can learn from human playing style and generate new algorithms for itself. I doubt that Nival/Ubi has enough ressurces to develop something so good in a way that it also functions.

I would like to see many parameters like starting ressources for human and AI, strength of neutral creatures, AI combat algorithms (you know H3 combat AI on easy vs hard). AI agressiveness on adventure map (like H1 or like H4) etc to be all independently choosable before starting a game.

04-02-2005, 05:35 AM
While real self-scaling AI is a distant dream, there is a kind of cheat that would give a pretty good impression that the AI was in fact matching your difficulty.

Generate an Easy, Normal and Hard mode. Easy would be brain dead AI, practically non existant while Hard would have the AI cheating up the wazoo, getting resource bonuses and having extremely high "roll" values for mral boosts and such.

Between these two extremes there are 40 or 50 difficulty settings hidden from the player. Each difficulty adds or removes a feature from the AI.

Normal could be AI with no stat perks over the player, with each increment up or down adding +/- 5% to their chance of winning a roll or something to that effect.

I can't imagine this being TOO difficult, as you simply have to program the UBER-CHEATING-AI then trim a feature off and call it a difficulty until you are left with something brain dead.

Its 5 in the morning here so if that didn't make a lot of sense I'll repost later...

04-02-2005, 05:45 AM
I agree that it is not so difficult to create a ├╝ber-cheating-AI and then set gradual limits to it. But if it is self-scaling, how does the AI determine how many limits to apply? Simple estimation of kingdom strength of human player? It could even work, but I would not like that "self-scaling" to be only available mode for playing. The estimation that AI does may completely fail in some cases (like RPG style maps or games with lot of quest huts and worthy rewards.)

04-02-2005, 06:29 AM
I think it's not very difficult to "teach" AI to battle well in tactical combats. HMM3's one is rather good, but it may be better. For example, attacking every time when it's possible - not a clever idea. http://forums.ubi.com/groupee_common/emoticons/icon_wink.gif
AI's behaivor on adventure map will never be brilliant, so I'll be glad if AI wouldn't do childish mistakes, as going away from the main town without leaving a garrison in it when enemy is close to.

04-02-2005, 11:34 AM
They need 4 or 5 levels of AI to choose from.
Novice, Knight, Giant and Titan or something among these lines.
The best way to make ai good is to watch humans play and script ai to use the strategy that a human would use in a particular situation.

If they have a closed or an open beta for HoMM5 with good players Nival can observe the strategies used and both balance the game and adapt the strategies into the game ai.

An observer mode or a reply feature might help that too. But back to the point, just make ai good enough and make it use strategy scripts copied from good human players on the net. This can be also easily patched in with a few lines of script to update the current strategy without actually recompiling the game code.

So basically just balance the multiplayer game well and then see what humans do in pvp and adapt it to pve. Easier than making a self adapting Military grade ai:P


04-02-2005, 01:05 PM
Actually "Atheist" has a good idea there. If all
of these things are configurable in an ai.cfg
file somewhere, then we could tweak AI difficulty
to our heart's content. Hence "Difficult" would
have a base series of settings, for everything
from starting gold to stats bonuses for enemy
heroes, which you could then alter in the config

That of course is still a poor second to having a
truly challenging AI which needs no extra goodies
to beat you, but since I haven't seen such an
AI in any strategy game ever, doing things this
way would be a good secondary choice.

John DiFool

04-02-2005, 03:01 PM
AI is very important for me in my games.But sadly it was a disaster in Heroes 4.It is true that AI learning is inthe future and cannot be done.But on the other hand we do learn.
I say how about we create a database so that heroes AI can be updated over and over again with contribuitons from us.When we find a good tactic or a good manevour we simply post it to that data base and profesionals evaluates the tactic.─?f it is good or is not done before, a script is written with a chance of being activated.So artificially we got a way of teaching something to it.
I got this idea from JabberWacky.com where there is a data base where you can ask questions to the machine if it does not have the answer you give the answer so when somebody next time asks the same question it answers it correctly.
Let me explain this tactic thing correctly.
Lets say you found out that flying gargoyles near some low level shooters is usefull.You write and send it to the database.They evaluate it and give %30 percentage chance to occur.
Later that day somebody logs in to the site downloadsthe script otomatically.From then on when computer has gargoyles in his army,it evaluates the situation(not to do something stupid like flying 10 gargoyles near 200 archers)and if the chance is right flies near the shooter.This can be also done with spell combinations and troop cmbinations.
just some simple managment tactics which will make it seem like more human.

04-04-2005, 10:57 AM
Heh, obviously most of you have no idea how "AI" works. Asking for a heuristic AI is like asking for immersive neural input visuals.. where you can feel the wetness of the water.

The idea of adding in new "strategies" is marginally possible, however it is most likely counter-productive. Games that use things LIKE this use them mostly for build prioritization, NOT combat tactics. Anything that gets down to the tactical level become far too granular to be useful.

I too hope for good AI (and btw for good non-cheating AI, see Total Annihilation, RTS, but very well done) and hope that the devs allow significant time for Beta Testing <holds hand up as a volunteer {offers self as ultra-high end computer owner}>. For those looking for a good AI in a turn based game, scrounge up an ancient copy of MAX and have fun! Finally, AI's can cheat and still be fun, look at Master of Orion 2. Fabulous game, decent AI, and it cheated like crazy on the higher settings...

04-04-2005, 11:57 AM
Well, I dislike having a cheating AI, Im not cheating, then why should he?
My suggestion would be to make AIs moddable, that way you really can teach the AI things, and after many AI mods are produced, someone could take all of them and compile them into one massive user-created super genious AI that will thrash players.
I'd also like to point out that no HoMM had a very smart AI, especially the tactical AI which followed strict rules which often just got it killed (as an example, if an enemy unit wanted to hit another unit but didn't have enough moves to make it all the way, it would stop right at the edge of the walking area of the enemy troops, which often meant it will take it another turn to reach the enemy [which is a killer if archers are present]).

04-04-2005, 03:19 PM
The idea of making the AI moddable is also a pretty unfortunate one. Concepts like this sound, well, actually, even on the surface they don't sound all that good (heh) however, they are even worse in (common) practice. Making an AI that you know is not very good, and relying upon the gamer community to make it good is... unwise. I understand the posters desire, however the state of the art does not allow for any of these "suggestions" to be particularly useful. Again, all the "moddable" AI designs out there simply take building plans and schedules and use a very simple comparison engine to select among them. The "player input" in these schemas consists of providing what amounts to tech tree paths, and economic structures. This remains fundamentally true when you examine community based Mods such as those seen withMOO3.

What I hope for is a competantly designed AI that has had a good amount of testing put into it. If they want to expose the AI keys and hooks so that the player community can modify the AI's activites that would be OK. Having said that, Ubi and Nival... please, please, please let the AI play a competant game before relying on the "kindness of strangers" to pull it through.

04-04-2005, 04:06 PM
I don't really have any suggestions on how to create a good AI for HOMM V, just wanted to check in and state that the AI "fun factor" from easy to legendary is really really important to me. I'll be playing 99% single person games and having no challenge to look forward to would spoil the game for me... On another note GalCiv and M.A.X. are the 2 TBS games that stand out for me in terms of its AI (MOOs 1 and 2 are classics as well but cheated as hell, which I dont' really mind either as long as it's fun) Well, besides Chessmaster which I still can't master (that's why I keep coming back to it)

p.s. Oh, yeah, the sad AI that would move its heroes forwards and backwards in place doing nothing, and committing suicide was what killed HoMM IV for me, clicking on the shiney things on the map was only that much fun for a little while http://forums.ubi.com/groupee_common/emoticons/icon_frown.gif It was just too sad to watch the 'opponents' moves

04-04-2005, 09:42 PM
Although I can't really contribute to the way the ai has/will perform, one thing that people tend to overlook is their own mistakes while playing any of the past heroes games. I mean how often have you guys RELOADED a saved game just to cover one's mistake or a good move by the ai???? With the save/load option what chance has any ai got???

04-04-2005, 10:12 PM
Average Joes that want to win can select easy difficulty but shouldn't have any say at all in the making of this game.

I do hope that they will make the great A.I. and that the PC magazines will play for more than 2 days to fully see if the A.I. is any good. Judging from what they wrote of Heroes IV I made the conclusion that they are bought.

Wurtzel1952 - So true. It's actually a form of abuse/cheating but people will deny it for themselves so they will feel better.

04-04-2005, 11:10 PM
Hey, Im all for a smart AI, Im just saying that allowing the community to mod it will improve it as well (as long as its not instead of building a smart AI in the first place).
Oh, and I remember a funny thing in HoMM III where the AI kept running in circles in and out of a portal, that was funny, yet sad.

04-04-2005, 11:59 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>So true. It's actually a form of abuse/cheating but people will deny it for themselves so they will feel better. <HR></BLOCKQUOTE>
Are you serious?? This is abuse? Excuse me but if you play at Champion difficulty and don't save regularly what chance do YOU have?

04-05-2005, 07:31 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Menathor:
Are you serious?? This is abuse? Excuse me but if you play at Champion difficulty and don't save regularly what chance do YOU have? <HR></BLOCKQUOTE>

Every chance in the world. The harder the difficulty the bigger the stacks and the easier the A.I. will die by neutral stacks. Actually at Champion difficulty the A.I. is dead straight from the beginning....
But what I mean by abuse/cheating is that you can reply a turn until you're perfectly happy with the outcome while the A.I. can't do ****.

04-06-2005, 01:13 AM
Yeah, I admit that the save/reload feature is a form of cheating, but to me this is kinda what drew me into the game. By reloading, you can make sure everything you do is super efficient, which is highly appealing to perfectionists like me (even if I do consider myself to be a lazy perfectionist, if that makes any sense at all).