@JJ: We're just always going to disagree aren't we?
Jolly Joker wrote:Alamar wrote:
Could you be a little more specific in what you mean by "how"? Do you need to see a SPECIFIC algorithm, source code, or what?
I just mean some basic considerations about how the AI should act in practise, the way I did.
Well I'll try to be MORE specific but I'm not sure what it will accomplish. I will try to use general terms so that everyone understands [hopefully] what I'm trying to say.
On day 1 each AI faction gets its own independent AI thread so it can process its data and plan its moves accordingly. The point of spawning threads is that so when it's the player's turn the AI has some extra time to plan in the background to figure out what it should be doing.
While it's the player's turn I have the AI looking over variables like map size, guardian strength, starting hero levels, starting army strength, etc. Then you need to develope a time estimate for how long the various guardians are going to keep you away from the other factions AND how long the guardians will keep the other factions from getting to you.
This can be used to tell you if you should plan for a "big fight" in week 1, 2, 3, etc. This info will then be used to guide things like castle build priorities, hero build scripts to choose from, how much time you can afford to spend safely maximizing your economy / leveling your hero / etc. before you have to get to the payoff.
Once you know how much time you have then you can begin looking over "your territory" and deciding what things you can take so that your total army strength is maximized at the time you expect the big battle(s) to happen. Please note the AI needs to come up with a path / plan that lets it get to the most things of the highest value in the least amount of time. THIS IS NOT AN EASY PROBLEM per-se. If the AI isn't doing a good job we'll just have to program some "rules of thumb" and hope it gets close enough.
If [when] the AI has problems coping and not playing up to a challenging level then this is where you design a set of bonuses/cheats that will help make up for its deficiencies.
Through iterative testing and tweaking you should come up with a reasonable result.
Alamar wrote:
May I ask why you see predictability as an issue? Could you elaborate on that please?
IMHO with multiple scripts allowed per hero [say 3-5] you would not see too much of a predictability problem. Why? Assuming you play with random heroes you'll have about 10 different heroes to choose from. With 3-5 different hero builds you'd have to play at least 30-50 games before you saw each pattern. Before you saw patterns repeat you'd have to play 60-100 games [probably much more!] before you'd notice the pattern per-se. By the time heroes became "predictable & boring" you're looking at [realistically] 200 games minimum!! [assuming use of random heroes]
Also, because I as a human tend to develope a given hero almost identically every time I play, why is it a problem if the AI does this? Why not use a system that will dramatically increase hero power thus leading to better fights & more competition with a human?
If you are worried about a human hiring a well-built AI hero that they could actually use then I don't see that as an AI problem .... I see that as a game design issue. Note your issue is just as large of an issue whether the AI develops a good hero who is defeated then hired vs. a human developing the good hero who is then defeated then hired.
[Sarcasm warning] Lord forbid we have AI heroes with good skills and abilities that match their spells fairly well. Lord forbid that we fix one of the BIGGEST AI problems that the HoMM series has had.[Sarcasm over]
I simply don't think it's necessary. If you look at a Warlock for example and the skill probabilities then the heroes should develop well most of the time IF the correct abilities are taken for the skills picked. Since I don't think that in battle AI against neutrals things are considered like whether the AI has Tactics or not (and I don't think it should be considered it's not necessary to pre-define hero development at all. I actually think it's against the spirit of the game because it's highly map-dependable what skills are the best set, really (Navigation, and Estates are examples for abilities that might be of use or may never be of use for the AI). The only thing that I somehow would like to make sure is that IF the AI has a magic skill it should get the abilities that fit to their spells as well.
The probabilities SHOULD do an adequate job now.
For now I think that we agree that H5 does a poor job [considering the skills & abilities available] at building a hero.
IF we rely on probability to give us what choices the AI can pick from we also need to make sure that when the AI is presented with choices it makes appropriate ones. Right now that "choice making AI" simply isn't there. FYI a crude "make sure X% of choices are abilities" is not NEARLY good enough. Whatever is done should [theoretically] fit in with some plan / goal the AI has at building the most appropriate hero given the circumstances that it finds itself in.
IF the skills choosing problem is too hard to solve then it makes sense to me to just remove the hard problem of "choosing the best from a set of random skills/abilities" to just choosing the best set of pre-canned scripts from a list of hero development scripts and just going from there.
As an aside I think one thing that may help the AI is to have a very simple to use but powerful set of tools in the map editor to help give the AI hints as to how the map maker would like to see them develope. This could include "mandatory skill choices" [Logistics then Navigation for example], suggested goals & priorities, etc.
As a matter of fact I believe that it would be a good idea to be able to give mapmakers HUGE control over things like AI bonuses and the like so that they can EASILY make sure they get the desired behaviour from the AI.
Alamar wrote:
We clearly disagree on the purpose of an AI. To state it again the CORE principal is to develope an AI that is a "fun opponnent to play with" for a wide variety of players, with a wide variety of skills, on a wide variety of scenarios / maps.
Are you in any way saying that the above core value is wrong? If so then please explain why the goal of the AI should be "a fun opponnent"?
If you agree with the core principal then which of my specific goals based on that core value to you disagree with and why?
1. The AI should be competitive for a wide variety of players in a wide variety of scenarios.
2. The game experience, whether playing AI or human, should be as similar as possible.
3. The AI should not give us [I.E. players with many differing sensibilities] reasons to be upset with its behaviour.
Based on the above why is TRYING to teach the AI to play by the rules [not necessarily play like a human] a bad thing?
I disagree with point 1. IMO, the AI should be competetive NO MATTER MAP OR PLAYER OR VICTORY CONDITION.
I believe that you do not understand what I was trying to communicate. Your statement is a little too broad and general for what I was trying to get across .....
If I as a map maker decide that I want a deliberately weak faction [for story purposes] then I shouldn't have to go to great lengths to fight the game's inherent bonuses that allow the AI to "break my map" because it is too strong.
The AI should be strong when the map is set up in a manner that allows it to be strong [most situations]. However if I as a map maker design a side to be weak then it should be weak no matter WHO controls that side.
Point 2 is something I CLEARLY disagree with, simply because it is in direct contradiction to point 1. The AI cannot copy human behaviour in any way that would make it competetive.
Actually it does not HAVE to be in direct contradiction with point 1 at all. You ASSUME that the AI has to copy human behaviour in order to make sure gameplay experiences are similar. It doesn't have to do this although IF you could make that happen it would be great.
All you need to make gameplay experience similar is:
1. Have the heroes that the AI builds basically look like the sort of heroes a human might build [even if the builds have to be scripted] under similar circumstances.
2. Have the army sizes of the AI look roughly [maybe a little larger] than what a human would build over that time.
3. Have the AI on a time schedule that is not too dissimilar from a human.
4. Have the AI use some basic goals that humans might share.
Note you could "cheat like the dikens" where the AI doesn't have to do ANYTHING in a manner that a human would do it and still end up with a situation that would make the gameplay experience reasonably similar.
Right now H5 shatters 1-3 above and isn't even close.
Point 3 is phrased so wide that I can't agree with it either. Upset? Depends on what people upsets. It's basically impossible to please everyone and no matter how you do things there will alyways people that are upset about something.
Therefore that's why you have to allow people to customize the behaviour of the AI to suit their particular desires!!!
I feel confident that the developers of H5 didn't care about point 3 which is why everyone is crying about the AI because it gives LOTS of people a LOT of reason to complain. I contend that if you look at the AI power curve that if you didn't know that you would get complaints about "the cheating AI" then you didn't do your job to make sure the AI is a "fun" opponnent.
In the end you want an AI that is FUN first. Everything else comes second. If (to be fun) it needs to compromise other basic principles in certain circumstances then so be it .....