Introduction

This is the Manual for the new Advanced Melee Artificial Intelligence for Warcraft 3 - Reign of Chaos and The Frozen Throne that provides a host of information about AMAI, how to install, and detailed use of the developer edition.

AMAI is a mod/tool for Warcraft III: Reign of Chaos and The Frozen Throne made to improve the computer AI of the game in all possible ways.
AMAI will make it easier to edit the War3 AI and hopefully harder to beat it but at the same time more challenge and fun.
The goal is to make a human like opponent or ally that both react on events and tries to insult you by chat taunts while playing in a more human like way.
FEATURES:
26 predefined profiles.
Support for an almost unlimited amount of different profiles.
57 predefined strategies.
Support for an unlimited amount of strategies for all races.
Fully supports both Warcraft III: Reign of Chaos and The Frozen Throne.
- - - Note ROC no longer recieves balance or strategy updates but will benefit from engine improvements
Support for 10 different languages.
Easy to use strategy and profile editor.

Automatic building
AMAI computers operate completely automatically by building all needed buildings and upgrades to complete every goal given in as short time as possible.
For example: a AMAI computer only needs to know that it shall build a hero and 15 footmen in order to do so. It will automatically build all needed buildings, workers and farms in order to get this as fast as possible.
Dynamic strategy changer
AMAI Computers will constantly monitor the current situation of the game they are in and always try to pick the best suited strategy to counter the enemy forces.
The computers will pick from all strategies added for the race they are playing and use the strategy that currently has the most positive parameters compared to the situation. It depends on what kind of units the enemy got, what race allied and enemy players are, how long the game has been going and what favorite units the current profile got.
AMAI supports an unlimited amount of strategies, try the developer edition to create your own.
Profile system
There are currently 26 different profiles in AMAI all with unique personalities in ways of favorite units and game style. Some computers can be real chickens and never dare to attack you until they got a really large force like [AMAI]Chick3n or they might come rushing at you at once like [AMAI]Crazy_Rusher.
In every game all computers pick a profile randomly but only once, same personality can never exist twice in the same game. You may also find some profiles give up really easily while others will be extremly stubborn.
AMAI supports a nearly unlimited number of profiles, try the developer edition to create your own AMAI personality.
Battle control
AMAI has an enhanced micromanagement control to help the computers to keep as many units as possible alive by fleeing by town portal, zeppelin or foot. It is also enhanced to make the enemy force suffer as much as possible by focusing fire on the most vulnerable enemy units first if they are in range.
The Commander
Allied computers can be ordered to use specific strategies, build specific units or attack given targets among many other commands.
This feature also brings an additional game mode called 'Computers Only' that turns all human players in the game to observers that shall try to win by commanding the computers on their team to victory.

REQUIREMENTS

First you will of course need a copy of Blizzard's Warcraft 3 with or without The Frozen Throne expansion pack.

Current Supported Versions
RoC 1.17 or later (reccomend 1.20)
TFT 1.20

You will need a computer that meets Blizzards recommended system requirements for Warcraft 3 since AMAI will consume a bit extra CPU power and the minimum system requirements might not suffice for use with AMAI.

AMAI DEVELOPER EDITION REQUIREMENTS

To make own strategies it's also very helpful if you have some previous experience with programming of any kind.
You will need a program able to edit tables in form of tab separated text files if you are a campaign creator or for some other reason want to make AMAI work with custom units. Microsoft Excel is a good example of such a program.
You also need to have Perl installed on your computer in order to compile your AMAI and make use of the AMAI Editor to edit profiles and strategies. It's free and you can find it here. Do not install the 5.6.1.638 version as is not fully compatible and errors can occur.

Download and install it and then after rebooting your system you will be able to execute perl files (.pl) that are used for compiling AMAI and managing the strategies.

TECHNICAL SUPPORT

AMAI installer claims that it can't find some files and disables the install button.
In Player Edition, you likely unpacked the Zip without keeping the directories. That means you unpacked all files into one directory instead of having the directories like in the Zip.
Can i play in Battlenet after having installed AMAI ?
Yes, but in Player Edition be sure to use a subfolder installation to have the default unaltered maps to play on Battlenet and in the subfolder you can have the same maps but with AMAI in them.
If you have Simple Edition then just use the normal Exe instead of the AMAI one for playing ladder.
I installed AMAI Player Edition and i can't play in battlenet , why ?
You didn't used the subfolder installation suggested in the readme and ignored the warnings of the installer. To restore the maps open them in the world editor and save them there.
What is that subfolder thing you are talking about ?
(This does not apply to Simple Edition)
How about reading the readme file ?
To install AMAI properly and not breaking your battlenet experience :
Create a subfolder in your "maps" folder like "maps\AMAI" and -copy- the maps you intend to use AMAI with there, then start the installer "AMAI.exe".
After the installation of AMAI, on your "maps" folder all the maps will remain unaltered (and so not breaking your battlenet) and in the "maps\AMAI" subfolder you will have the same maps, but altered to support AMAI .
How do I use AMAI on a MAC?
Maps are archives (similar to e.g. zip). Files added there are used by Warcraft instead of the normal ones.
So what you need is a program that can access MPQs on a mac (There should be one on http://www.wc3sear.ch/index.php?p=Tools ).
Then add the scripts in the Scripts\TFT subfolder of AMAI (or Scripts\RoC for RoC) to the map that should use AMAI with that program. They should be in a Scripts subfolder of the map too. So common.ai goes to Scripts\common.ai .
For the Commander also add Blizzard.j from the Scripts folder to the Scripts folder of the map.
If you have a Windows computer at hand you can also use the AMAI installer on the Windows computer and copy the resulting maps to the mac.
I use AMAI Developer Edition but during compilation I get the following error message: "Unknown discipline ':utf8' at ejass.pl line 38."
UTF-8 is the encoding that Warcraft uses (it is a unicode derivate so it can encode characters of loads of languages). Unicode support is available in ActivePerl 5.6x, but has only been properly done since 5.8x so I suggest upgrading ActivePerl (there might be some way to make it work in 5.6x, but I am unsure what that requires).
How can I make profile specific chat lines ?
Use a condition on the name of the AI. Like
{Name=Aggressario}This chat line will only be used by the profile named Aggressario.
I get an error while compiling the Developer's Edition, what do i do?
First don't panic. Second, check which file the error is in and note the line number. In the compiled scripts find the file in question. Open it in notepad use the "go to.." command under edit to enter your line number. You can then see what is causing the error and hopefully that will help you in finding the source of the problem.

AMAI developer edition gives the following "'perl' is not a valid batch instruction or operation"
When installing perl you must check the "Add Perl to path environment variable" otherwise the developer edition will not work.

AMAI dosn't compile the scripts properly and appear blank but executable works fine?
You may be using 5.6.1.638 version of perl. Please make sure you update to a newer version of perl.