HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AMAI 2.2

07-18-2004, 10:08 PM#256
AIAndy
The currently used code only allows one type of transporter. It would require more changes to allow several types of transporters.
07-20-2004, 04:40 AM#257
thenonhacker
Hello Strategy Master! Your Warcraft II Map with AMAI is promising, and AMAI itself did a good job of implementing strats. However, it is quite unfair, when it used the mass Paladin strategy, because all Paladins seems to find manual casting of heal a breeze. :-) It's like mass priests with heavy armor, high HP, high damage.
07-20-2004, 07:47 AM#258
Strategy Master
Quote:
Originally Posted by thenonhacker
Hello Strategy Master! Your Warcraft II Map with AMAI is promising, and AMAI itself did a good job of implementing strats. However, it is quite unfair, when it used the mass Paladin strategy, because all Paladins seems to find manual casting of heal a breeze. :-) It's like mass priests with heavy armor, high HP, high damage.

Unfair... Blizzard has always said that heal may be overpowered and not so much bloodlust and the computer just shows how right they are as some people can mass spam hotkeys. I'm afraid the computer will continue to use heal for now. But be aware that they do not use heal in the most efficient way. Some cast it when they are not full of mana and therefore only heal about 2 hp. Full mana paladins will wait until the other paladins have become empty. So although it looks like a healing frenzy actual fact some units have only been healed by 1 hp.

One thing you could do is to try and mass heal yourself or if orc make sure you use bloodlust effectively. Just queue up the casting of bloodlust over your units before a battle by holding shift with all your ogres selected. If you have a nice supply of ogres, your see all your units become bloodlusted really quickly. Now go smash those paladins up. Heal for human players is much harder to use and yes humans only use it normally after a battle so you are going to have to try and learn a way to beat computer heal. I have beaten the computer many times myself so it can be done although i have also lost many times.

I may start my own balancement of units and spells once i have got the complete replica done depending on what seems overpowered and such.

Oh next time do not post in AMAI spot cause i pretty much sure they do want to see all this here as its not really anything to do with them, please leave feedback here
07-21-2004, 11:36 PM#259
HunterSeeker
Hey, this AI is really good. I wish I could pitch an AMAI player vs a player using default Blizzard AI just for fun.

I do have a question though, I am making custom map and I am trying to get AMAI to work with the custom units I have there. The problem is that I have replaced the entire Human race, and thus replaced their units in the StandardUnits.txt file as well as altered all strategys and Profiles accordingly. Yet, the computer gives compile errors. It seems to be looking for units that are simply not there. Is there anyway to fix this?
07-22-2004, 09:29 AM#260
Strategy Master
There are some files that you have to change the units manually.

AMAI/TFT/Human/BuildSequence.ai

Open that in wordpad and at the very beginning is the global build sequence that will still have some old human units in it. Delete them or change them to the appropiate units. This is what the race builds no matter what strategy they use.

This is the same for all the races.
Also if you have changed the heroes then they need to be set there proities in the Heroes.txt file.
07-22-2004, 11:56 AM#261
AIAndy
There is actually a way to let AMAI play against the Blizzard AI. I wrote a program that merges the common.ai files and one set of the racial .ai files so both work on the same common.ai . Then I also wrote a Blizzard.j that allows two sets of AIs where the first set is started for the first half of players and the second for the rest.
It did not work properly for some versions of AMAI but it should work with the current one again.
07-22-2004, 01:51 PM#262
HunterSeeker
That you StrategyMaster, that helped a lot. I still had to keep the originial units in the StandardUnits.txt file, but it well works, almost. I still get this compile error:

Code:
Making AMAI
_____________________________
creating \Scripts\TFT\common.ai
\Scripts\TFT\common.ai created
Parse successful:     2139 lines: common.j
Scripts\TFT\common.ai:3378: Undeclared variable: TOWN

Scripts\TFT\common.ai:3378: parse error
Scripts\TFT\common.ai failed with 2 errors
Parse failed: 2 errors total
_____________________________
creating \Scripts\TFT\elf.ai
\Scripts\TFT\elf.ai created
Parse successful:     2139 lines: common.j
Scripts\TFT\common.ai:3378: Undeclared variable: TOWN

Scripts\TFT\common.ai:3378: parse error
Scripts\TFT\common.ai failed with 2 errors
Parse successful:     2156 lines: Scripts\TFT\elf.ai
Parse failed: 2 errors total
_____________________________
creating \Scripts\TFT\human.ai
\Scripts\TFT\human.ai created
Parse successful:     2139 lines: common.j
Scripts\TFT\common.ai:3378: Undeclared variable: TOWN

Scripts\TFT\common.ai:3378: parse error
Scripts\TFT\common.ai failed with 2 errors
Scripts\TFT\human.ai:776: parse error
Scripts\TFT\human.ai:791: Missing endif
Scripts\TFT\human.ai failed with 2 errors
Parse failed: 4 errors total
_____________________________
creating \Scripts\TFT\orc.ai
\Scripts\TFT\orc.ai created
Parse successful:     2139 lines: common.j
Scripts\TFT\common.ai:3378: Undeclared variable: TOWN

Scripts\TFT\common.ai:3378: parse error
Scripts\TFT\common.ai failed with 2 errors
Parse successful:     1874 lines: Scripts\TFT\orc.ai
Parse failed: 2 errors total
_____________________________
creating \Scripts\TFT\undead.ai
\Scripts\TFT\undead.ai created
Parse successful:     2139 lines: common.j
Scripts\TFT\common.ai:3378: Undeclared variable: TOWN

Scripts\TFT\common.ai:3378: parse error
Scripts\TFT\common.ai failed with 2 errors
Parse successful:     1969 lines: Scripts\TFT\undead.ai
Parse failed: 2 errors total
_____________________________
creating \Scripts\Blizzard.j
\Scripts\Blizzard.j created
Parse successful:     2139 lines: common.j
Parse successful:    11411 lines: Scripts\Blizzard.j
Parse successful:    13550 lines: <total>
=============================
Making AMAI finished
Tryck på en valfri tangent för att fortsätta...

Obiusly it is looking for a variable called TOWN, but I cant find any reference to TOWN (without _HALL) in any of the files I have edited. The other error I have no idea.
07-22-2004, 05:52 PM#263
Strategy Master
heres an idea. Open the actual script common.ai that has been produced in notepad.
Click edit then click Goto

Enter 3378 as thats the line the TOWN is on. Then find where that is coming from.

But thats likely because somewhere in your standardunits.txt there is a TOWN somewhere that shouldn't be. I can guess cause its around where the units are set, but i might be wrong.

And the second error is caused by the same error as thats just telling you script compile sort of failed.
07-23-2004, 07:50 AM#264
Goose
Hi,

I'd like to request a change to the hero probabilities. I recommend the following for your consideration:

MTN_KING 30
PALADIN 15
BLOOD_MAGE 5 is good, but +5 ally bonus as well?

DEATH_KNIGHT 40
DREAD_LORD 20
LICH 10 is good, but +10 2nd hero bonus as well?
CRYPT_LORD 20

Orc are good

DEMON_HUNTER 30
MOON_CHICK 20
WARDEN 25

SEA_WITCH 10
BEAST_MASTER 10
DARK_RANGER 10
PIT_LORD 5
BREW_MASTER 5
GOBLIN_THINKER 5

Keep up the great work
07-23-2004, 10:51 AM#265
HunterSeeker
Thanks a lot, I got it to work. It was a stupid mistake on my part (sigh).

A final question though, does the AI only attack when it has a hero? If so is there anyway around it that is not too complex?
07-23-2004, 01:55 PM#266
Strategy Master
Yes it only attacks when it has a hero. The way round it is to use harassment attacks as a replacement of the main attack.
07-24-2004, 02:09 PM#267
peon
Hello guys

Hero Perservation:
Now seems to working basically, though not very smart, and I know Aiandy is rewriting this part, so I would check it again when the new one is out ^_^.

Army Tracker:
It is very good! Now AMAI responds faster when attacked, and it attack enemies more directly, without wandering too much.

Bug/problem:
1. It expanded only on mines far away, but neglected a mine just next to the primary location.

2. When its tree of life at primary location was destroyed, and it did not have an exp, it seemed it did not know to rebuild a tree and keep on its tasks. Then I commanded it to change strat, hoping that it realized the missing tree, and it turned out that a tree was built, but in random location, not near the original mine or a nearest place where the mine be entangled.

3. tree harvesting buildings are not built near trees or places where peasants chop trees.


I haven't compare the scripts, so not sure whether it happened from the beginning, or just this version.

Would it be nice if there is an option if chosen AMAI would loosen up and change to theorcraft? That is, you can command any kinds of unit combination - mixed mountain giants and archers; mass mountain giants and cats; command the computer to choose your favourite heroes to test the effect of special combinations, etc.

work, work...
07-24-2004, 03:10 PM#268
Strategy Master
@AiAndy
I was wondering if you were going to add a list of what the other global constants do. Cause this version explained all the newly added ones. I would like to see one on the old constants as that would be most helpful.
An example--- UNIT_GOLD_PERCENTAGE 0.9 --- so what does this do?
07-24-2004, 04:08 PM#269
AIAndy
@peon: 1. It might have been too near to already taken expansions or the start location. Try reducing expansion_radius and look if it fixes it. Or reduce the multiplier to the expansion radius in the code in CheckExpansionTaken. Currently he considers an enemy building or an own expansion building within 3/2 * expansion_radius as this expansion to be taken.
2. In previous versions he would never rebuild that main building but in this there is a chance he will because he will now consider that as an untaken expansion. Of course that means he first has to chose that as expansion but he should because it is not guarded and the expansion time has to run out.
3. Building placement is done by the hard coded AI so it would require a lot of work to do that in the script.

@Strategy Master: Yes, I guess there should be some more comments added.
gold_unit_percentage is one of the hardest to explain. It is part of the formula for determining how many production buildings to build. The higher it is, the more often more than one production building for a certain unit will be built.
07-24-2004, 09:32 PM#270
Zeta09
I try to play several games and several maps to test the AMAI before I post. I see that my previous post was essentially ignored so I consider that my fault. Perhaps I wasn't asking the question in the correct manner.

the more I see how the AMAI builds the better I get but I do have a question on why with Humans if the Hero priority is set to 93 and the Footman is 89 at the beginning of the game both are built/trained at the same time but if the same priorities are set for the Orc there is a time lapse (about 30-40 secs to 1 minute despite the AMAI having the money to train one Grunt) and then trained one after another. For some reason I cannot seem to have the Orc Hero come out immediately. Ideally I would like the AMAI to build both a Grunt and the 1st Hero at the same time.

Secondly, Expansions are still a issue with AMAI despite setting all levels to 2 or 1 in the LevelStrengthMap file. Additionally when one of the comps actually do attain an expansion it will occasionally builds defensive structures. If you and Zal could import the aggression of the normal AI and then tweak that then AMAI would be complete. Normal AI seems to attack expansions above all else and secure them once attained. Then it attacks opponents. Although AMAI does wander towards the expansions it never seems to committ and then seems to run back and forth thus wasting time and unecessarily losing straggling units when it runs.

I keep on asking about this because if the AMAI isn't given a plethera of money it just follows the build order then runs out of money and just sits there.

Any suggestions on this?

-Should the AI target, Expansion Target and Target rate in the personalities all be set close to normal comp?

-I don't believe my expansions are within the radius that you all spoke of above but all in all as peon mentioned it does tend to ignore the closest expansion and go further away.