• 🏆 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 1
Joined
Feb 24, 2013
Messages
2
AMAI + FrozenFire's Addon Race

Is it possible to combine those two modes? I would like to play as a Naga vs AMAI CPU. Or play vs AMAI Naga ;) It would be superb.:ogre_love:
 
Out of curiosity, are the perl scripts needed for AMAI 100% irreplaceable and needed, or are they just for the GUI and for starting some other scripts? Honestly, I couldn't find the right version of Perl online with some searching -- only some people saying that I could buy something with backwards compatibility on one site, and something saying that old versions probably have viruses on another site.

I've been working on a 6-race Warcraft melee mod called Heavens Fall (we're planning to get to 8 races, we currently have half of the seventh race in the early developmental stages) and I was considering adding AMAI to Heavens Fall because quite frankly I think it would probably totally best the current AIs that I made in the editor's GUI (and one I've been working on in the arcane .ai scripting format, in which I2S doesn't even work right).

I just started reading a compiled "Scripts\common.ai" file out of your basic AMAIe.exe distribution, and I really respect the work you guys have done making AMAI. But, this isn't my first time thinking "Well maybe I could put AMAI in Heavens Fall..." and then after hours of looking for a way to make the Perl scripts work, or looking at your files thinking maybe I could get around the need for the Perl scripts... I just wanted to ask: I have some Java programming experience, and recently learned how to compile GUI Java applications that I write into EXEs from Jars. Do you think it is remotely possible that I could build a Java version of whatever Perl is needed for here, and offer it to you guys as just a GUI exe that would do the same stuff?

I just really get the feeling that as I sit down and try to learn this developer's edition and I can't even make it work, surely there's got to be some better and faster way to get to the endpoint of having sophisticated AIs in Heavens Fall. But maybe I just didn't look in the right place for Perl?

I guess I'm not sure.
 
Level 1
Joined
Dec 8, 2018
Messages
1
Hi

I just wanna know if there would be newer version of AMAI coming? since Warcraft 3 has been patched with 1.30, I have noticed few issues. The Orc AI does not produce Spirit Walker since it was moved to Tauren Totem. The AI only produce them when Tauren Totem is built. However, Orc AI main production is usually Raiders and Spirit Walkers. The message says "I will build Raiders and Spirit Walkers" and it proceeds to build 3 Spirit Lodges, which do not contain SP anymore. This actually crippled Orc AI to the point that it only mass produce Raiders to 54 or something food out of 100. Will there be a way to fix this? I admire AMAI very much. Hopefully, there will be a newer version.

Thank you
 
@FRosTFuRy When I got The Tales of Raviganion mod running on Patch 1.28 (not published because I did not ask anyone for permission) I was unable to get their custom flavor of AMAI running on 1.28 at the time because I looked in the .AI script code and it uses confusing hacks with the return bug that were dependent upon string literal ordinal implementation or something like this. I thought it would never be able to be updated past Patch 1.24. But you're saying this bundle works for you on Patch 1.30? That seems like exciting news.
 
Level 4
Joined
Jan 9, 2019
Messages
70
Although you have a little clue on the good strats as you have hardly watched thousands of pro replays, I agree this can be useful only from the point that any imporvement on dumb computers is nice, it would be better if you consulted with someone who is aware of the best strats and add it in the prog. However, who still plays vs PCs anyway? They choose either bnet or some servers to play with people , not computers... and I guess this isn;t made for RPGs to be harder and for melee, thast why I say all this for the melee poinr.

Dear friend, you're wrong, I still playing aginst the computer because here, where I live, we have no Internet connection everytime, I must say AMAI is very good because it improves the melee AI of the computer, and obiusly, we all love playing aginst an computer when we are offline.
 
Level 1
Joined
Apr 1, 2020
Messages
1
When i install amai the maps no longer show players and colours or anything and wont run. Pls help. In the description its mentioned something about MPQEditor htsize? I have no idea what that means. Again pls help. Older versions of amai ran just fine for me but i cant get the new versions to run on my new system. Im running TFT 1.26.
 
Level 4
Joined
Jul 10, 2013
Messages
60
There is some odd bug where the AMAI for Orc, Human, and Night Elf isn't upgrading past Tier 1 buildings. Undead sometimes upgrades all the way to Black Citadel.

Using 3.0 downloaded like... 15 minutes ago, so its up-to-date

EDIT:
"AMAI is designed to work with melee maps.

If you make a custom map you need to make sure in the world editor it is also set to Latest Patch dataset and still using the melee AI. If you don't do this the AI will get stuck upgrading past tier 2 as it will use the vanilla patch.

To change the patch data set use the following menus from the world editor.

scenario - map properties - options - game data set - Change from Default (based on map melee status) to Latest Patch"



This fixed it. Custom made Melee Maps =/ Melee maps apparently @_@.

Of course, doesn't help when Warcraft can't handle 24 players worth of armies fighting and crashes out. Shrinking it down to 16 players still crashes out lategame. Booooooooo
 
Last edited:
Level 2
Joined
Jan 16, 2021
Messages
7
[QUOTE =“策略大师,职位:3468209,成员:111053”]已上载v3.0.1,以解决中文翻译问题。[/ QUOTE]
well,2.6.1Also have these problems
 
Level 1
Joined
May 4, 2018
Messages
5
Got a serious issue here,when my friend and i trying to play 2v22 amai,the game becomes super laggy after 10mins which is the time when units get more and more.Its unpalyable like 1 fps 1 sec.But the original Ai its ok to play.Please do something about it.
 
Level 2
Joined
Nov 5, 2009
Messages
20
Oh, I was big fan of AMAI. Thx for reviving it.
But using comandline to install? Lol seriously? In 2021? Just make normal .exe intaller please.
 
Level 1
Joined
Feb 25, 2021
Messages
1
I need help with this using the latest reforged, extract melee maps with Cascview and followed the guide with cmd but when in game the Ai is just default
 
Level 2
Joined
Nov 18, 2020
Messages
6
Greetings everyone, I stumbled upon a problem when trying to install AMAI into the unofficial WC3 maps, notifying me that Blizzard.j is missing.
AMAI no Blizzard.j.PNG

I'm using ver. 1.30 right now and I have searched every place for that specific certain file including MPQeditor, CASCViewer and even hopping on GitHub. I did acquire blizzard.j file from a chinese contributing guy and placed it in the same directory of AMAI but still to no avail.
On top of that, I have also reinstalled it, followed the manual thoroughly and never tamper with the files in it.
The consequences are the AI cannot be initialized and hence AMAI itself got stuck when I was trying to get it on a map.
AMAI no AI files.PNG


Stuck AMAI.PNG

At the same time, I am sure blizzard.j is just an optional file for AMAI to work to get you an option to command your AMAI allies strategy.
So anyone knows what's wrong or where I have made a mistake?
Does anyone came across the problem and got the solution?
 
I'm using ver. 1.30 right now and I have searched every place for that specific certain file including MPQeditor, CASCViewer and even hopping on GitHub. I did acquire blizzard.j file from a chinese contributing guy and placed it in the same directory of AMAI but still to no avail.
Hi. I am subbed to this thread and got your notificiation.

I did not use AMAI since patch 1.21 but I can tell you, blizzard.j is in EVERY patch of the game, even Reforged, and is always located in "Scripts\Blizzard.j". On 1.30 it is in the casc in a folder named "War3.mpq/Scripts/Blizzard.j" or something quite similar to this.

AMAI is probably only looking for the file to be in an MPQ. You could try using CASCView to take the file out from your 1.30 install (do not use a third party Blizzard.j because it might be the wrong version) then use MPQEditor to make a small MPQ containing only 1 file located at "Scripts\Blizzard.j" (must be backward slash on old patches, MPQEditor does this for you if you make a folder).

Then name your tiny MPQ as "War3Patch.mpq" and put it into your Warcraft 3 installation. I have a hunch AMAI would probably look for it in this location, just guessing, but I have not look at AMAI stuff in many years.
 
Level 2
Joined
Nov 18, 2020
Messages
6
Hi. I am subbed to this thread and got your notificiation.

I did not use AMAI since patch 1.21 but I can tell you, blizzard.j is in EVERY patch of the game, even Reforged, and is always located in "Scripts\Blizzard.j". On 1.30 it is in the casc in a folder named "War3.mpq/Scripts/Blizzard.j" or something quite similar to this.

AMAI is probably only looking for the file to be in an MPQ. You could try using CASCView to take the file out from your 1.30 install (do not use a third party Blizzard.j because it might be the wrong version) then use MPQEditor to make a small MPQ containing only 1 file located at "Scripts\Blizzard.j" (must be backward slash on old patches, MPQEditor does this for you if you make a folder).

Then name your tiny MPQ as "War3Patch.mpq" and put it into your Warcraft 3 installation. I have a hunch AMAI would probably look for it in this location, just guessing, but I have not look at AMAI stuff in many years.
Thank you for your suggestion. Afaik and read, war3mpq has gone away after ver. 1.30 patch.
And the creator of AMAI doesn't provide clear, up-to-date tutorial or guide to install it except the manual that was made like what? A decade ago? xD
I'm dumbfounded how there's not even a single tutorial on YouTube by anyone too! Only gameplay.
I think most of his/her stuffs are more of developers-centred things, bad for layman like me, not my specialty getting too deep. :)
 
developers-centred
But the other question then is what "developer" means in this context. Sometimes I know stuff that more competent users of certain computer systems do not know, because I spent more of my time specifically modding Warcraft III.

The Warcraft III patch does not matter for what I was describing for example. The point of why I am saying to create a War3Patch.mpq file is specifically because I am already aware of what you were saying.
Afaik and read, war3mpq has gone away after ver. 1.30 patch.
This file has gone away, and that's why if you create the equivalent again in the old format, I was thinking you can trick AMAI to work.

In fact, if you were using an old version where MPQs had not gone away, then it is important to not do what I said since you would not want to damage your installation.
 
Level 2
Joined
Nov 18, 2020
Messages
6
Alright, so I have finally found this

blizzard.j founded.PNG


Attempt to turn into .mpq file + name it

1st.png


2nd.png



3rd.png


End result,
4th.png


So it has became War3Patch.mpq, I have tried to put it at:
1) Warcraft 3 directory
2) AMAI directory
3) AMAI ''Script'' directory

Neither work.
Or maybe there are mistakes in the process...
 
Level 2
Joined
Apr 16, 2017
Messages
7
Anyone having troubles with more than 1 AI? When I create 4vs4 not all AI are amai, some stay as default ai and do nothing. w3 1.32.
WC3ScrnShot_061421_075035_001.jpg
 
Last edited:
Level 3
Joined
Nov 3, 2017
Messages
34
How to download AMAI 2.6.1? I only download AMAI 2.54. It contains 2 archives - AMAI 2.54PE and AMAI 2.54DE (this one is generally encoded) and the card does not always work first. AMAI 3 did not understand how to use it at all. Please advise me if this does not bother you. Thank you
 
Level 28
Joined
May 14, 2021
Messages
1,095
How to download AMAI 2.6.1? I only download AMAI 2.54. It contains 2 archives - AMAI 2.54PE and AMAI 2.54DE (this one is generally encoded) and the card does not always work first. AMAI 3 did not understand how to use it at all. Please advise me if this does not bother you. Thank you
You can get the latest version of AMAI by using the link below OR you can just click on the big "Download" button on the description.
AMAI
Keep in mind the 2.54b one that provided for this site is password-protected.
 
Level 4
Joined
Jun 23, 2016
Messages
64
I've been playing with it and having a lot of fun. It's way more varied and intelligent than the original AI

Here's a couple of interesting pics:
WC3ScrnShot_090121_050729_001.png

An AI peasant building a Town Hall next to a Fountain of Health in the Divide and Conquer map, I wonder what prompted the AI to do this. Never happened again even though I played this map and others with Fountains plenty of times

WC3ScrnShot_090321_202916_001.png

A desperate attack from a NE

The only bug I've found is that sometimes the heroes won't pick up the items they get from creeps, even though they have plenty of inventory space.
 
Level 28
Joined
May 14, 2021
Messages
1,095
Does this work with Reforged? Why exactly does it have to be a full modification/.exe? Is it also available for single maps only?
It is possible, but since Reforged uses CASC, it might be a difficult way to install this mod. Furthermore, Blizzard uses the anti-cheat system to prevent you for using third-party modifications. There is a people who posted the installation instructions without problems:
Advanced Melee AI
 
Top