HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Strange behaviour, hard coded AI bugs?

11-23-2002, 08:44 PM#1
AIAndy
There are several strange behaviours of the AI that I am pretty sure are hard coded and not caused by the scripts:

1.) After getting attacked, the AI, especially the undead AI, sometimes sends single units as soon as they are built on kamikaze missions to the enemy.

2.) Sometimes attack groups don't attack an enemy and just seem to follow him around in the same way as a human with the move command can do. They get attacked by that enemy but do not fight back.

3.) Problems with ability usage: In a computer against computer game today the banshees stopped using the curse spell after they reached master. They only used AMS on heroes after that and did only use posession once late in game although they had many chances. They ran around with 400/400 mana most of the time.
Posession seems to be used very seldom in any game.

Can anyone verify these? Do you know a way to work around these things to prevent them from happening ?
11-23-2002, 10:53 PM#2
MartinezTG
I was witness of the sittuation you're talking about in "1.)"

I have seen it the first time when I made a level in which before reaching the enemy base you had to destroy several human guard/cannon towers. After destroying some towers - the enemy suddenly has sent not only his "CampaignDefenderEx"es but also units that should have been used for a later attack and as you say "sends single units as soon as they are built on kamikaze missions to the enemy".
Ok enough of talking about the problem let's talk about how to fix it.
I made the towers far from the base belong to an allied player of my enemy (not shared vission of course cuz he might want to come with help) and changed their color to the same as my enemy's.
Sorry to say it but i don't know how to fix the other two. Well I also don't know if in 1) the general reason for the AI's stupid actions is that his units are to far from the base.
Hope I did help.

Martinez
11-24-2002, 10:59 AM#3
AIAndy
Thanks for the reply. I am working on the melee AI so unfortunally I cannot change the map to remove that problem. It often happens when the enemy attacks an expansion and I cannot work without those. He even uses meat wagons for that sometimes, so I am pretty sure it is a hardcoded problem. It also occured with the original AI.
11-24-2002, 02:55 PM#4
Guest
You're not using any of the 'SuicideUnit...' functions are you? Those cause the AI to do exactly what you're talking about, they send units on random suicide missions as soon as they're available.

Blizzard uses these functions in some of the campaign scripts. I believe they use them to make sure that when it gets close to the end of the game the computer will just send what it has. I can't imagine that those functions would make it into your melee script though, so you might be right about it being hard-coded...
11-24-2002, 06:00 PM#5
AIAndy
No, I don't use any SuicideUnit... function. That stuff also happened in the original melee AI and they definitely do not use these functions. I think the kamikaze problem has something to do with the hard coded part of the AI not detecting that the attack is over.
12-01-2002, 01:58 AM#6
Guest
Indeed this is awefuly annoying. Human's sometimes just send 1 footman after 1 footman at times.

I'm no expert but I think I have a idea that might be the problem.


The computer is out of gold and/or wood.
12-01-2002, 10:27 AM#7
AIAndy
I checked that, but he is still building units and as an observer I could verify that he still had both. But with the undead the result is usually that he has no more wood soon because he stops gathering it.