• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Advanced Melee AI

This tool originates from here

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 comes with the standard AI scripts pre-built for you.

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

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-electron-manager.exe to open the installer.
  • You can install to a single map or a whole directory.
229876-72e655a9dd9f2e63484ded955b08e80c.jpg


Warcraft Requirements and Versions​


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

  • REFORGED(RFG) : The AI scripts intended for the latest version of warcraft 3 1.36+ (regardless if its reforged or not)
  • TFT : The classic Frozen Throne AI scripts intended for TFT 1.24+ version of warcraft 3. Has some forwards compatability support up to 1.31 including 24 player support although tech tree changes in later versions will not be available to the AI.
  • ROC : The classic Reign of Chaos AI scripts intended for ROC 1.24+ version of warcraft 3. Has some forwards compatability support up to 1.31 including 24 player support although tech tree changes in later versions will not be available to the AI.

  • Avoid v1.29 of Warcraft 3 as it breaks various things and prevents AMAI from chatting. This is just an issue with this version and you can downgrade or upgrade.

Command Line Install
  • From a windows commandline or powershell type InstallRFGToMap.bat "C:\mymap.w3m" 1 and press enter to install AMAI to maps
  • If you do not want to have the Commander installed to control team mates or easily change language settings instead run InstallRFGToMap.bat "C:\mymap.w3m" 0
  • 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" "false"
  • After installing AMAI on your map just start Warcraft 3 and play the map against and/or with computers to make use of AMAI.
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 do not appear to work. 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.

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.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 Map Pack 3.3.1 (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 7
Joined
May 26, 2004
Messages
56
Hi Strategy Master, thank alot for the awesome work on this AI.
But i got a problem with 3.3.3 . If i go team with a Comp vs my friend + a Comp. We got disconect right after the AMAI chat in very first minute of the game .
Someone got this problem or just me ? I tested with many maps (no any trigger inside)
Thanks Domivn, is this happening with the Commander installed or without? If yes it may be a workaround to try without the Commander installed otherwise may be something causing the desync in the core logic.
 
Level 4
Joined
Jan 5, 2022
Messages
51
I don't think there's one rn, maybe if you play through LAN that might fix something but that means that you'd have limited pauses etc so idk
 
is this a bug or just never working?
it's supposed to say an enemy color, but I have never seen it working.

also, when is the sound "creepaggrowhat1" used in the game? besides by the AMAI to announce their strategy? I'm using a custom one that sounds more pleasant, instead of the default one from the game that sound like someone is hitting your ears with a brick :S

edit: noticed it's working in some lines, must be some of the messages not written properly.
 

Attachments

  • WC3ScrnShot_032024_142111_000.jpg
    WC3ScrnShot_032024_142111_000.jpg
    59.7 KB · Views: 17
  • WC3ScrnShot_032724_225733_000.png
    WC3ScrnShot_032724_225733_000.png
    182.7 KB · Views: 5
Last edited:
Level 2
Joined
Aug 22, 2023
Messages
5
Look like a bug, many heroes from Tavern not pick skill point . And Undead buy Goblin Shredder but not use it to havest lumber, just stay at base and keep very low lumber. Im using AMAI 3.3.4 and TFT no Commander , play on 1.31.1
1711533551469.png

1711533728783.png
 
Level 6
Joined
Feb 22, 2009
Messages
212
I need some explanation on how to install this bundle. Been looking around this description page and all the external links for hours without being able to find the installation instruction.



So I am using War 3 patch 1.30.4.

1) What exactly do I need to download?

1.1) Do I only need to download the launcher?

1.2) Do I need to download the AI package too or does the launcher have with it the AI package already?



2) I got both the AI package and launcher.

2.1) Do I need to do anything else or is the installation of this bundle finished?

2.2) Do need to transfer the files and folders within the "TFT" folder of the AI package into the "TFT" folder within the "Scripts" folder of the Launcher folder?
 
why are night elves so prone to block the entrance on maps like market square that only have one way in and out of the base.
it happens very often and they end being stuck inside, only let space for worker unit to go out and expand xD

I need some explanation on how to install this bundle. Been looking around this description page and all the external links for hours without being able to find the installation instruction.



So I am using War 3 patch 1.30.4.

1) What exactly do I need to download?

1.1) Do I only need to download the launcher?

1.2) Do I need to download the AI package too or does the launcher have with it the AI package already?



2) I got both the AI package and launcher.

2.1) Do I need to do anything else or is the installation of this bundle finished?

2.2) Do need to transfer the files and folders within the "TFT" folder of the AI package into the "TFT" folder within the "Scripts" folder of the Launcher folder?
copy the amai folder inside the installer resources folder.
then run amai-electron-manager and install the version you need into the map.
make sure map is using jass language.
 

Attachments

  • WC3ScrnShot_040224_091712_000.jpg
    WC3ScrnShot_040224_091712_000.jpg
    709.7 KB · Views: 11
Level 13
Joined
Jun 9, 2008
Messages
258
So this looks really great, and I suppose if I want to find more about it I'll just have to install it and try it out, but since I don't have access to my PC right now, maybe a few questions. I believe I am working with a 1.29 Version (it supports 480 maps with 24 players).

1) From the latest Updates and Feedback here, is it essentially as simple as copying maps to new folders and running the installer? And going into "Scenario" in the editor for the right melee data I guess.

2) AI always has trouble with 480x480 maps, but I found even vanilla blizzard AI lets you have at least some gameplay in the 480ies (it's just that some of the AI players randomly decide to just keep spamming workers, and things like that). Does AMAI do better than vanilla AI with huge maps?

2a) Related, several posters said 24 player maps do not work because they crash. Is that still true?

3) The AI chat is a neat feature, but I feel it would clash with what I try to do especially in custom campaigns. Is it easy to turn off?

4) I do indeed work with modified melee maps, meaning units have different stats. Is that a no-go? Posters here said it is only really guaranteed to work with un-modded techtrees.
Also, one feature in my project is that buildable terrain is itself a resource, in that most of the terrain is unbuildable and every base location has only so much space, meaning you can never have all techtree buildings in one spot and are forced to expand if you ever want the full techtree. Is that something AMAI could handle? I know vanilla AI seems to be doing okay-ish as they seek relentlessly for building spots, but I haven't done too much testing yet.
 
Last edited:
Level 4
Joined
Jan 5, 2022
Messages
51
1) Yea and if something goes wrong feel free to ask here

2) I dont know
2a) Most likely cuz you are running older version which hasnt been updated in years

3) AMAI does not work with custom campaigns. Either way, I think it can be turned off

4) This works like Blizz AI does. If you modify units, then it should not be a problem. Some triggers will also not affect AMAI (eg adding a timer). But adding an entire new resouce is... not recommended. You will have to modify the entire code yourself, which is one hell of an overkill. It's gonna act like Blizz AI does.


Some other things that break AMAI are spawns close to each other, like Friends (tho it's fixed with the newest version, which is Reforged only) & stuff like gates. I remember I wanted to play a melee map in which a gate had to be destroyed for the teams to be able to finally meet each other (Dragon Fortess) and all bots would just try to enter without entering the gate, resulting in all of them being stuck
 
Level 4
Joined
Jan 5, 2022
Messages
51
Look like a bug, many heroes from Tavern not pick skill point . And Undead buy Goblin Shredder but not use it to havest lumber, just stay at base and keep very low lumber. Im using AMAI 3.3.4 and TFT no Commander , play on 1.31.1
View attachment 467795
View attachment 467796
this might occur because AMAI is made for patch 1.36 data. AKA you might have downloaded incorrect version
 
Level 4
Joined
Jan 5, 2022
Messages
51
You're using AMAI 3.4.4 right? This is reforged, 1.36+ only. If you're playing on classic patch 1.29, it was around this time where Blizz AI broke and wouldnt learn any spells either
 
Level 1
Joined
Apr 14, 2024
Messages
3
Hi all, I am using AMAI on Reforged (however the game is played on Classic graphics).

I have downloaded the AMAI installer and extracted the latest version (3.3.4) and the CASC View.exe to extract the maps I wanted into the folder C:\Users\User\Documents\Warcraft III\Maps\AMAI. All the maps were cut & paste into the folder and deleting the subfolders that contained them during extraction). After that I ran the AMAI electron Manager and chose 'Install Reforged on Folder' as instructed and after the process is completed I ran the game, chose a map from the AMAI folder & started the game, I did receive the messages that AMAI is installed for this game however when I used the cheatcode iseedeadpeople to check on what the computer is doing, all I saw was Orc Peons only mining gold and Night Elf Wisps only mining lumber without building additional workers or construct any buildings?

May I know what went wrong in my installation or should I try with earlier version of the installer?
 
Hi all, I am using AMAI on Reforged (however the game is played on Classic graphics).

I have downloaded the AMAI installer and extracted the latest version (3.3.4) and the CASC View.exe to extract the maps I wanted into the folder C:\Users\User\Documents\Warcraft III\Maps\AMAI. All the maps were cut & paste into the folder and deleting the subfolders that contained them during extraction). After that I ran the AMAI electron Manager and chose 'Install Reforged on Folder' as instructed and after the process is completed I ran the game, chose a map from the AMAI folder & started the game, I did receive the messages that AMAI is installed for this game however when I used the cheatcode iseedeadpeople to check on what the computer is doing, all I saw was Orc Peons only mining gold and Night Elf Wisps only mining lumber without building additional workers or construct any buildings?

May I know what went wrong in my installation or should I try with earlier version of the installer?
check that the map is using jass language.
 
Level 4
Joined
Jan 5, 2022
Messages
51
Sorry can you let me know how do I access those options with more detailed steps? Where do I look for that?

Thanks.
open the map through the world editor, then scenario -> map properties is on the top.
1713427202478.png
1713427212338.png

Scirpt language is the second to last one. Here are screenshot for help
 
Top