Advanced Melee AI

This tool originates from: http://www.wc3campaigns.net/forumdisplay.php?f=601
- Wayback Archive of Wc3c

Source code now available at: SMUnlimited/AMAI

Latest Release Notes

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 many possible ways.

AMAI will make it easier to edit the War3 AI, harder to beat and more 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.

  • Personality Profiles: Each AI opponent has a set profile which modifies how it reacts or plays the game. Some can be real chickens and never dare to attack you while others will rush you down.
  • Dynamic Strategies: Constantly monitors the current situation of the game and always try to pick the best suited strategy to counter the enemy forces.
    • The computers will pick from all strategies depending on what kind of units the enemy has, how long the game has been going and what favorite units the current profile has.
  • Enhanced Micromanagement Control
    • To help keep as many units as possible alive by fleeing by town portal, zeppelin or foot.
    • This includes better use of items and healing items.
    • Makes the enemy force suffer as much as possible by focusing fire on the most vulnerable enemy units first if they are in range.
    • Will buy neutral heroes and units.
    • Can occasionally attempt tower rushes and militia/ancient expansions.
  • Enhanced Team Play
    • Coordinates with allies what it will be attacking or will join allies in attacking a target.
    • Human players have access to the Commander, letting you give commands.
    • Asks for aid if running out resources.
  • Surrenders : Based on profiles some AI's will give up when it detects its losing, while others will fight to the death.
  • Chat Support
    • AMAI will taunt enemy players, and share its build strategy with team players.
    • Includes Support for 10 different languages.
  • Easy to use Strategy and Profile editor.
    • Supports an unlimited amount of your own profiles.
    • Supports an unlimited amount of your own strategies.
    • Auto Building feature for example: a AMAI computer only needs to know that it shall build a hero and 15 footmen. It will automatically build all needed buildings, workers and farms in order to get this as fast as possible.

How to play
AMAI release has the standard AI scripts pre-built for you. You just need to install the scripts to maps or your game.

Map Extraction​

Most install options require installing onto maps, so these may need extraction first.

It is suggested to create a subfolder in your "maps" folder like C:\Users\<username>\Documents\Warcraft III\Maps\AMAI and copy the maps you intend to use AMAI with there.

You can opt to download a map pack containing a selection with AMAI preinstalled on or you can install onto your own maps.

For Warcraft 1.30 onwards you need to use Casc Storages - Main page to extract a copy of the official maps.

On windows make sure the maps to install onto are not in a protected UAC location.
  • This may mean you have to install to maps in a different directory then copy into your Maps folder afterwards
  • Or run installer as an administrator

Warcraft Requirements and Versions

There are multiple editions of AMAI available to install based on your warcraft 3 version you run with. Some install methods you must use the correct abrievation in the table to install the correct scripts.Improvements and fixes to the core AI engine will improve the older scripts as well.

AMAI ScriptsOptimal VersionSupported Version
REFORGED1.36.2 - 2.0.01.33+
TFT1.24-1.281.24+
ROC1.24-1.281.24 - 1.31

Optimal version is based on the warcraft tech tree this edition is based on. Use a version further away from the optimal the more likely it will affect the AIs ability to build, usually just unoptimal build order but worst case it can no longer build at all.Classic AI scripts do have some forward compatibility built in to fix some major issues in later versions including 24 player support.

Avoid v1.29.x of Warcraft 3 and either upgrade or downgrade as it breaks various things including but not limited to:
  • Preventing AMAI from chatting.
  • Heros not learning skills although we have a fix that can get applied, this may not work if the map itself is too old.

AMAI Installer
  • The installer has to be downloaded separately as its much larger compared to the AI package.
  • Unzip the contents of the installer to a folder of your choice.
  • Double-click amai-installer.exe to open the installer.
  • Select whether to install to a map or whole directory.
  • Select if Commander is enabled, or if you want to have AMAI play against the vanilla AI. Even teams are Vanilla AI, odd teams are AMAI.
  • Use Optimised Scripts: Optimises the scripts to use less CPU and memory. On by default.
  • Override Default AI Language: Sets the default chat language of AMAI to current language of the installer and disables initial game prompt of language in the Commander.

installer.jpg




Command Line Install
  • From Windows CMD/PowerShell or Wine wineconsole, run this: .\Install<Version>ToMap.bat "C:\Documents\Warcraft III\Maps\AMAI\<Map>.w3m" <N>
  • Where <Version> should be replaced with ROC, TFT, or REFORGED, <Map> with your preferred map, <N> with 0 or 1 or 2 if you want to not install the Commander or install the Commander or install the VS Vanilla AI mode respectively.
  • Alternatively for complex installs if you have perl installed from a commandline you can type perl InstallToDir.pl REFORGED "C:\Documents\Warcraft III\Maps\AMAI" and press enter to install AMAI to all maps in a directory and subdirectories.
  • You can disable the commander for this install via the perl InstallToDir.pl REFORGED "C:\Documents\Warcraft III\Maps\AMAI" "0"
  • After installing AMAI on your map just start Warcraft 3 and play the map against and/or with computers to make use of AMAI.

Manual install

  • You can manually use the included MPQEditor.exe to install to a single map.
  • You can use this with WINE to install on linux/Mac systems too.
  • Copy contents of AMAI\Scripts\<Version> into the Scripts folder in a map.
  • If wanting to use VS Vanilla AI mode copy the above scripts, but then also copy contents of AMAI\Scripts\<Version>\vsai into the Scripts folder in a map. You must copy the blizzard.j here instead of the original.

Manual Mod Install

You can install the scripts locally to your game folder to enable the AI for any map you play and to avoid extracting the official maps.
  • Change registry key: HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III" - Allow Local Files"=dword:00000001
  • Create a Scripts folder locally and include the *.ai files and Blizzard.j for the VERSION you want.
    • Pre 1.30 you can try and use the WC3 Mod Manager to enable.
    • 1.30.0~1.31.x : Create Scripts folder in the game root directory
    • 1.32.0 + : Create Scripts folder in the game retail directory
  • Run game and play a custom game on a standard melee map.
Notes
  • Advanced Melee AI is made to be used on 'melee' maps only so please don't try to use it on completly custom maps (e.g towerdefence), it will make no difference on such maps.
  • Custom melee maps need to be set to latest patch data. Open the map in the Warcraft editor, go to Scenario->Map Options-> and change "Game Data Set" to "Melee (Latest Patch)".
  • Lua maps are supported, but the Commander can only be used to set language and game mode at game start. You cannot use the commander during the game.If you want the full Commander support, Open the map in the Warcraft editor, go to Scenario > Map Options, and change Script Language to Jass, then install AMAI to it. If Script Language is disabled, please reset the Trigger Editor to its initial state.
  • You may need to run as an administrator if you have issues with maps not displaying any teams.
  • Note maps older than 1.24 will need resaving in the world editor if you want full 24 player support.
  • AMAI is more resource intensive than the normal AI scripts. At 24 players there is a higher risk of lag and crashes as the game cannot handle too many script operations happening in the same game frame. Reduce the number of players if you have issues. We continue to optimize and fix issues to help avoid this occuring.

V2.54
The original 10 year old version that supports 1.24 - 1.29 warcraft.
The download for 2.54 is the developer edition intended for developers to use.

For everyday use the player edition is alternatively available to download here


NOTE: The old 2.5.4 zip is now password protected because Google Chrome is flagging it as malicious software. The password is amai. Note some of the dlls are flagged as virus generic false positives in 2020 due to there age, but they are false positives


Keywords:
Artificial Intelligence, AI
Previews
Contents

AMAI 3.4.1 (Binary)

AMAI 3.4.2b (Binary)

AMAI 3.4.2b Installer (Binary)

AMAI 3.4.1 Installer (Binary)

AMAI 3.4.0 (Binary)

AMAI 3.4.0 Installer (Binary)

AMAI 3.3.5a Installer (Binary)

AMAI 3.3.5a (Binary)

AMAI 3.3.5 (Binary)

AMAI 3.3.4 (Binary)

AMAI 3.3.4 Installer (Binary)

AMAI 3.3.3a (Binary)

AMAI 3.3.3a Installer (Binary)

AMAI 3.3.2 (Binary)

AMAI Map Pack 3.3.2 (Binary)

AMAI 3.3.1a (Binary)

AMAI 2.6.2 (Binary)

AMAI 3.1.1 (Binary)

AMAI 3.2.2 (Binary)

Advanced Melee AI 2.54 (Binary)

Reviews
AMAI is very, very good. Much better than any Blizzard AI. I love it. ==Update - 25/08/12== It has recently come to our attention that some antivirus softwares like Norton detect a virus in this, however, we can assure you that it is a false...
Level 6
Joined
Mar 19, 2015
Messages
68
Thank you!!!
Please tell me will the AI be smarter/better if i disable the "optimized scripts" , so that it can use more CPU/memory?
 
Level 9
Joined
May 26, 2004
Messages
81
Hello guys! what happened to Dynamic AMAI? a long ago it was adjusting strategies midgame.
And what about Undead Ally griefing, will it be fixed?
thx!
Dynamic Strategies are included. The built in strategy build orders are still followed and still change during game, but once current strategy build order is exhausted it will just build units by itself based on what it thinks is best. Or you can make your own empty strategies for the same effect immediately.

any news on a fix for the undead AI? they ruin every game by haunting allied gold mines lol.
3.4.2b now out with fix and another lag fix.
 
Level 6
Joined
Mar 19, 2015
Messages
68
Thanks for the update!

Sorry if i missed something obvious but is there a way for me to choose the general behavior for allied and enemy AI while in game?
For example i would love if ALL the AI would first build up to 50+ population before they attempt to fight each other, so big battles happen.

Also more aggressive expansions would be great, if the AI runs out of the current gold source.
Thank you!
 
Level 9
Joined
May 26, 2004
Messages
81
Thanks for the update!

Sorry if i missed something obvious but is there a way for me to choose the general behavior for allied and enemy AI while in game?
For example i would love if ALL the AI would first build up to 50+ population before they attempt to fight each other, so big battles happen.

Also more aggressive expansions would be great, if the AI runs out of the current gold source.
Thank you!
Yes the commander manually allows you to stop all attacks from AI allies or cancel that. But you have to decide when, you can't set up conditional settings.
 
Top