Jolly Joker wrote:This is a long post and I have one thing to ask. If you answer to this, don't do it the way that you pick half a sentence or two and come up with a, "no, not so". If you find something you can't agree with, try to show an alternative way or something.
I was actually going to pick apart your post but out of respect I will try to respond to the spirit of your post instead of the individual points.
First lets start with what I consider to be THE core principal of developing an AI for a game: The AI should be an enjoyable opponnent on as large a variety of different conditions as possible. It is this core premise that should drive the design and implementation of the AI.
The key question is how do you define "an enjoyable opponnent"??? This is an inherently subjective issue so 5 reasonable people would likely give you 5 answers for this. My particular definition would be:
1. The AI provides a reasonable challenge to me... I.E. if I don't play reasonably well I should lose. However if I play "perfectly" I should win. Ideally the level of challenge should be easily configurable [like difficulty levels]. Also the AI should provide a reasonable challenge on as wide a variety of starting conditions / scenarios as possible [like maps].
2. The game experience, whether the opponnent is human or AI, should be as similar as is reasonably possible.
3. The AI should not give me excuses to be upset with its behaviour.
For me if an AI can hit the 3 above points I would call it a "great" AI.
Now how would I go about developing the AI????
IMHO the only way to achieve all 3 points would be to TRY to teach the AI [as best as possible] how to actually play the game on its own following all of the rules. The 2 primary areas that I'd concentrate on are:
A. Setting goals, prioritizing goals, and ordering those goals so you complete them quickly while having as little "cost" as possible. [Basic Adventure AI stuff]
B. Battle AI -- Because you can't do anything without having to fight in HoMM. Also to give the human a good contest you want to fight as well as possible against them AND also fight as well as possible against nuetrals to preserve your army strength.
Unfortunately I believe that the above 2 things [Battle AI && Plan making] are such hard problems that other things such as Castle Build Order, Hero Skill picking, etc. will only receive minimal attention even though they are obviously important. Fortunately these items are comparatively easy problems ....
--------------------------------------------------------------------------------
At this point in the process you will hopefully have a reasonable competent battle AI and adventure AI. Both will complement each other.
I have very few illusions though that any static AI that I craft will be competitive without bonuses of some sort against a good human opponnent.
What my job though is to come up with a set of bonuses that will result in an enjoyably competitive match without destroying the game experience or giving me excuses to feel cheesed-off at the AI.
[Note: I am not counting letting the AI see the whole map as a cheat per-se ..... I just don't believe that you can develope an AI that can compete with a human that's played a map before without letting it see everything .... Also note that because it sees everything it doesn't HAVE to act on it ....]
Because I didn't pay much attention to hero skill building one of the first cheats that I may do is to make sure that AI controlled heroes are allowed to PICK the skills they want / need instead of getting a random selection presented to them. This will insure that heroes are strong in all stages of the game [early, mid, late]. Also as long as I follow the rules of skill / perk prereqs it is not easy for an human to tell the difference between an AI created hero on one made by a good [but lucky] human.
Any economic bonuses that would be given would never be in the form of any lump sum [I.E. day 1 bonus] but would need to be small ongoing bonuses so that they would not overly affect the game experience [I.E. no human could generate something like that so quickly].
Other bonuses, amounts of bonuses, etc. would have to be refined through a lot of gameplay and testing.
As a final step once you have the base difficulties [newb through impossible] figured out you also should have a "custom" game setting which will allow the player to control a large variety of sliders to control fascets of AI behaviour to their liking.
If you have questions on how I would handle anything specific then please let me know.
-------------------------------------------------------------------------------
Now onto the problems that not adhering to these goals has given us with the current AI.
First the AI in no possible way emulates the experience that you get when playing a human. The graph of their army power vs. time in game is nothing like you'd see from a human.
Second the AI is not a good opponnent on a wide variety of maps -- esp. low resource maps. With the AI getting an effective 9-1 resource bonus on heroic difficulty maps means that if you intend all players to be poor then the only player that is really hurt is the human player ..... Note that on heroic the AI has enough money to totally build thier castle without ever having to send a hero out at all ....
Third AI behaviour [in terms of bonuses esp.] is not configurable enough. It seems obvious to me [possibly only me] that no one system will please everyone. So it makes sense to allow people to create a set of behaviours, bonuses, whatever that suits them and will allow them to enjoy the game as much as possible.
Fourth the AI gives me plenty of reasons to feel ripped off or that it's dumb. The resource bonuses contribute to this greatly. Mediocre adventure map management doesn't help when you finally invade the AI territory to see that it hasn't even fully secured its own borders.