HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What is needed to create a human-like ai?

01-04-2004, 03:12 AM#1
Vidstige
The hard-coded wc3 ai relies heavily on cheating for selecting attack targets and know when it's a good time to attack your home-base or your expansion. It is also rather inflexible in its behavior, it follows a limited set of rules regarding how it should act. If you manage to figure out these rules, then you will have an advantage. How can the ai be made to stop cheating and act more adaptive? How can the ai be made to act more human-like?

Let's first consider the problems involved in not cheating (as in knowing where it should attack). Selecting a good attack target is easy when cheating, you just call a function which consult the wc3 engine and then you have a pretty good target selected for you, without any real effort. To decide on a good attack target without cheating, you will need quite some information (which you really should have gained without cheating). How should we go about finding these data, and how should we decide on how to act on them?

The second problem stated above is how to act in an adaptive and flexible way, preventing the opponent to guess the ai's plan and to act reasonable even in strange situations. I strongly suspect that the standard ai doesn't have a clue about what plan it's following, it's just following its rule-book. To achieve this quite a lot of data is again needed, data to decide on what plan to follow and even data which represent the plan itself. How do we get hold of these data, and how do we store them for further use?

The solution to both problems seems to be connected with collecting, storing and processing data. Let's consider these one at a time:

Collecting data is done by making function calls to the engine. Would we benefit from any particular extension of the interface to the engine?

Storing data poses a bit of a problem since Jass is ignorant of any advanced data structures. Which data structures do we need support for?

Processing data also poses a bit of a problem since it takes quite an amount of Jass code to make just about anything. Which syntactic short-cuts would we gain from?

I believe that if we can find and exactly define the problems which prevent us from creating human-like ai, then it would be much easier to make something about it.
01-04-2004, 11:07 AM#2
Datajax
If the problem of creating an almost completely human like AI had been completed yet then the world will be a hell of alot different.

It's impossible to create a human AI because humans are capable of doing things on a compulsive nature whereas robots must consider all the facts that they can relate to the situation (unless we can give them emotions too!). Also intelligence covers such a wide spectrum - try defining 'intelligence' and you'll find it almost completely impossible to do... playing a musical instrument could be 'classed as intelligent' but also someone with the skills to go rod fishing etc etc. There is no easy way to do (trust me I'm doing it next year at University). I don't know much about Jass because I've only started using it.

In reference to the question about the computer cheating, a computer will always pick the fastest route that it can, if theis involves cheatring then so be it. There is no point doing it the long way round for it because it 'feels' no enjoyment. If each unit was to need alot of storage then problems would arrive when there are big battles.

Second question - not got a jimmy's, however you're right in one aspect, the computer will follow a rule-book and very rarely adapt to how you are playing because that would take years of studying strategies etc which would just put Blizzard's releases back (a few more) years.

A realistic and adaptable AI doesn't exist yet, some realistic ones do but it'll be a wee while before anything 'intelligent' comes out...

That probably didn't answer anything but GL.
01-04-2004, 06:22 PM#3
Vidstige
Quote:
It's impossible to create a human AI because humans are capable of doing things on a compulsive nature whereas robots must consider all the facts that they can relate to the situation (unless we can give them emotions too!).
Why do the robot/ai have to consider all facts (the normal problem is having to few facts, by the way)? And why can't we give them emotions?
Quote:
Also intelligence covers such a wide spectrum - try defining 'intelligence' and you'll find it almost completely impossible to do... playing a musical instrument could be 'classed as intelligent' but also someone with the skills to go rod fishing etc etc.
I'll try to define Human-like ai for WC3 instead: A human-like ai for WC3 plays in a way that a human opponent have trouble deciding if it's a human (possibly not speaking your language) or a computer.

Quote:
In reference to the question about the computer cheating, a computer will always pick the fastest route that it can, if theis involves cheatring then so be it. There is no point doing it the long way round for it because it 'feels' no enjoyment.
Why would the computer always pick the fastest route? What if it didn't know the fastest route? What if it hasn't got the information available to cheat? What if we tell it to 'feel' enjoyment in not cheating?

Quote:
Second question - not got a jimmy's, however you're right in one aspect, the computer will follow a rule-book and very rarely adapt to how you are playing because that would take years of studying strategies etc which would just put Blizzard's releases back (a few more) years.
If someone else creates the improved ai then the releases don't have to be affected.

Quote:
A realistic and adaptable AI doesn't exist yet, some realistic ones do but it'll be a wee while before anything 'intelligent' comes out...
How about trying to speed things up a bit, shall we?
01-04-2004, 06:28 PM#4
Tommi
One additional problem would be sucky AI natives. Hero rushes, more than 1 attack group, etc. are generally out of question. emote_confused To script a human-level AI, you'd need a bit better natives that would open up more strategic options.
01-04-2004, 06:43 PM#5
Vidstige
I am considering developing an extended ai interface/library. What else other than extended support for attack groups is needed?
01-04-2004, 08:40 PM#6
Tommi
I don't know what you are able to do but a better support for accessing and controlling attack groups would be nice. You can't access individual units in an attack group now. And Captains should be improved a lot. They wander away from / get ahead of the real attack group all too easily now. :( In fact, I wonder if the Captain system is good at all.

Cheers,

Tommi
01-04-2004, 08:56 PM#7
Vidstige
How do we want the attack group system to work then? Assign some units to a group, give the group some orders, and off they go, how hard could it be? Surely not impossible...

How about starting with considering how the attack group/captain system work now and try to define how we want an improved system to work (let's assume it's possible to improve it as we wish).
01-04-2004, 11:33 PM#8
EnetheruAnuon
Like DataJax said, to get to the point where an AI would be difficult to distinguish from a human player, it would have to have emotions. For example, sometimes people use certain attack patterns just for fun or "because they feel like it." A comp, without emotions, can't do something "just for fun." It has to use logic. The comp can't have a favorite unit to use because it has no emotions. To reach something anywhere close to what you want, we would need a very precise blend of randomness and logic, and a more highly advanced game engine.
01-05-2004, 12:02 AM#9
Vidstige
I fully agree that what is needed is a combination of randomness and logic. I can't really see the problem with letting the ai player have a favourite unit, having emotions, or letting it do things because it feels like it. All it takes is some randomness and logic.

Why do you feel that we need a more advanced game-engine? Isn't it the same engine that the human-player is using? The question is if the same information is availible for both man and machine. If it is, I can't see how the game-engine are limiting us.

One thing to keep it mind is that when trying to build a human-like ai, you don't try to build it in one sitting, you don't just build an ai which without cheating beats good human players. What you do is that you build an ai which knows the simple concepts of the game, like a human beginner. When it plays like a real bad human, you try to add more concepts to it.
01-05-2004, 07:48 AM#10
Tommi
I understood "human-like" more as "human-level", in terms of performance. There are many AIs that perform better in complex tasks than humans. Autopilots of airplanes come to my mind as one example. There, I think, they have wanted to reduce the randomness of human piloting actions, rather than to simulate it.
01-05-2004, 08:17 AM#11
Vidstige
I agree Tommi; but, to quote myself:
Quote:
A human-like ai for WC3 plays in a way that a human opponent have trouble deciding if it's a human (possibly not speaking your language) or a computer.
With this I am mean that it's not only important that the ai plays good and are able to win games, but also that it actually plays like a human player would.
Human-level AI's Killer Application: Interactive Computer Games
(Laird and Lent, 2000) discusses how to use computer games for creating human-level ai.
01-05-2004, 12:52 PM#12
AIAndy
I guess an emotion simulation would not be too hard to do. Such things as favorite units are easy to do and even AMAI has something like that in the profiles.

The problem is the information gathering and the decisions that are then based on that. Information gathering without cheating requires to constantly check all the visible areas and put the information you see in a model. Then comes the hard part: Guessing what the enemy does based on this limited information.
An example for the difficulty: At the edge of the sight range the enemy a wyvern is seen, it flies away, you see one again at the same place and that 4 times. Now does that mean the enemy has at least 4 wyverns or only 1 that you have seen 4 times. Of course that is a rather farfetched example but to really deduct the maximum information out of it you have to know your enemy, you have to estimate if he is trying to trick you or if he is not.

So what a human-like AI has to do is learning as much about how the enemy thinks as possible.

This could of course be done by having a large database that says what the enemy is probably doing based on what he has done up to then but if this database is made by the creator of the AI then it will only contain the information that the creator itself posesses.
Much better it is if this estimation of what the enemy does is learned by the AI itself by playing. This could for example be done by using a neural network and/or evolutionary algorithms as the core of the Estimation engine. It is given the information that is gathered over time and it makes an estimation of the plan of the enemy.
A different engine could analyse what the enemy did in the end and feedback this information into the Estimation engine to improve further estimations.
Now based on the estimation of the enemies plan the strategy creation engine can now compute the counter strategy to the enemies estimated plan based on information about the units value and counter usefulness and the current amount of buildings and units it already has.
This strategy is then handed to the build engine which executes the plan in terms of building units and handling the base and the attack planning engine which schedules attacks based on the plan.

Well, of course that is incomplete and a lot of that is very hard to realize.
01-09-2004, 09:14 AM#13
Vidstige
Estimations are important and information gathering should probably be done by active scouting. It's not only important that the ai knows its enemy though, it should know its own strength also.

How about compansating for the lack of knowledge of the enemy by striving hard to decieve him?
01-09-2004, 07:25 PM#14
Darimus
You could use triggers also, to help make more advanced preset situations... like when it's ready to attack, it will only attack if the location isn't covered by fog or war, if it is, it would be issued to move to random specified regions (like in a game where you are scouting, you only search locations where the player CAN be located), and if they find it, attack...

and you could use triggers to set a random good combination each game of units, or 1-2 favorites, that are used to attack...

and if it was an offline map, it could cache the wins and losses of the player it's facing, based on the name or just how many times any name has lost/won, and automatically adjust it's difficulty possibly...
01-09-2004, 09:13 PM#15
Buttink
See 1 problem is that there is no completely random factor it could always be predictable

and its hard to define the things that make us human like cravings, and urges lol just these things not to mention the slowness factor.

or maybe or brain is 10 billion times faster than a computer but we are limited due to the random factor oh well