Welcome to the AMAI manual This is a compiled resource for all your AMAI needs. Have fun and we hope you enjoy developing for AMAI Click here to visit our website

News in 2.52c from 2.52

- Fixed a bug with strategy choice
- Fixed a bug with an unresponsive focus fire
- Fixed a bug where amai would never retreat from another players armies

News in 2.52b from 2.52

AMAI ENGINE IMPROVEMENTS

- First farm is now always built at the main base before it starts building farms at the front
- Millitia defense will use a few more peasants to help defend its base
- Unit micro controls are now always enabled
- Fixed a bug with hero with full inventory not buying healing items
- Fixed problem of AMAI occasionaly fleeing back home for no reason
- AMAI no longer keeps going to buy items from its shop when it goes onto another attack
- Fixed a strategy bug where amai wasn't researching its lumber upgrade
- Warden can now make use of its blink to get out of trouble
- Some tweaks to creep global setting values
- Fixed the healing and obsidian statue systems that had been disabled in 2.50 until the crashes it was causing could be fixed
- Cleaned up the micro management rules and improved likelyhood to teleport away in surround attack situations
- Night elf heros will now buy healing potions from the shop if there moon wells are empty
- Fixed a bug where heros wouldn't use healing pots on themselves
- Streamlined the militia expansion and tower rush attacks. Tower rush attacks are much less likly to fail and will slowly get closer to the enemies base instead of building the towers in a random fashion.
- Fixed a bug that could cause a unit to never be built if for some reason the building couldn't be built at the mine

AMAI DEVELOPER IMPROVEMENTS

- Fixed an issue where if you are using custom races you still required the original race folders
- Fixed issues with the vs ai editions that could cause the blizzard ai to get stuck picking a first hero
- Setbuildreact command now works differently. It will build both unit types simulataneosly but first unit to be trained will always be the first specified unit in the command. It will also always start building the units at the proirity of building all the food as the lowest food unit at the base priority given. See the references section for more info about this command.

News in 2.52 from 2.51

AMAI ENGINE IMPROVEMENTS

- Fixed a major issue where teleporting heros could break AMAI preventing it from doing any attacking at all.
- Fixed a bug where AMAI would still try to buy items from merchants which were unpathable.
- Fixed issue where AMAI would teleport home because enemies came into range of army even though AMAI not actually attacking.
- Some small tweaks to ally combat routines .
- Fixed a major bug with undead not able to take its ghouls into battle correctly.
- Improved responsiveness of unit micro systems.
- Fixed some bugs where AMAI would occasionally just stop its attack for no reason.
- Fixed a major issue where AMAI did not know how to rebuild expansions when destroyed and AMAI still owned them.
- Fixed an issue where on certain maps AMAI mistook certain creep camps as expansions.
- Fixed an issue where heroes wouldn't buy items from its racial shop if it wasn't at its main base. Caused issues of AMAI not recovering like it should be.
- Fixed an issue with buying emergency items and a hero full with items. Buying emergency items should ignore if a hero is full.

AMAI DEVELOPER IMPROVEMENTS

- Fixed a bug where turning ver_heroes off didn't always work correctly.
- AMAI now supports more than 3 types of dragons and if trained those dragons will be correctly added to the assault group.
- AMAI now handles the training of ghouls automatically and so is no longer needed to train ghouls at high proirities in the strategies themselves.

News in 2.51 from 2.50c

AMAI COMMANDER IMPROVEMENTS

- Chinese language translation implemented
- German language translation completed

AMAI ENGINE IMPROVEMENTS

- Major re-working of the harass code fixing many bugs and issues that occured in older versions as well as including better reliability.
- Fixed an issue where cannabalizing ghouls would stop cannabalizing before finishing eating of the corpse.
- Fixed multiple issues of buying systems counter acting each other where the buyer would get stuck moving between the two locations.
- Ancient expansion effeciency improved.
- General Improvements to elf strategies.
- Generally increased all racial aggression bonuses.
- Fixed some issues with units not returning home properly if no moon well was available.
- Fixed an issue in trying to buy items but no spare slot available.
- Improved windwalk usage in combat situations.
- Implemented a blademaster harrass that occurs 30% of the time if blademaster is the first hero.
- Fixed issues where a creeping army would most likly give up if there only hero was harmed.
- Fixed an issue with zepplins keeping heros/units stored forever
- Fixed a bug where units would not hide if where aiming to go to the shop
- Fixed multiple bugs with certain styles of items like healing pots and the regeneration healing scrolls.
- Hero proirty tweaks that not takes account of all 4 battle.net realms and not just one.
- Fixed a bug with inconsistant farm building
- Improved elf start game macro a little
- Fixed major bugs causing location and group stack corruption
- Healing systems now make better effective use of the lesser clarity potions and mana potions
- Fixed an issue where firelord could not learn the incinerate ability
- Hopefully fixed an issue where AMAI spam builds towers at its expansions
- Fixed a bug where AMAI could not buy healing items due to full inventory and so AMAI became stuck. AMAI will now drop non healing items from there inventory so they can buy that important healing item.
- New hero skill system idea designed by deutschepharma has been implemented. Now there is 3 possible skill arrangements for each tier that the hero can choose.
- Undead half as likely to train neutral heros. Orc 1/3 as likely to train neutral heros. Based off statistical information calculated by deutschepharma.
- Fixed the bug where if a tavern is in the game and not pathable the AMAI would train a normal hero but with no skills. The hero is now trained with its hero skills working succesfully
- Found many missing upgrades for all races and added them
- Fixed an issue where some strange orc upgrade was mysteriously placed in the TFT standardunits.txt but it dosn't exist
- Strategies that rely on there upgrades to work effectivly now have upgrades researched earlier instead of relying just on the advancedupgrades as well.
- If AMAI army gets into direct contact with a much too powerful enemy, it can town portal away instead of just running home.
- Optimized attack functions
- Fixed a reforming bug in the attack sequence causing army to constantly reform and take much longer to travel accross the map.
- Fixed some targetting issues of AMAI to make sure they more likely to attack expansions considering they are the weakest parts of an enemy.
- Fixed 1 small memory leak and 5 major memory leaks.

AMAI DEVELOPER IMPROVEMENTS

Will require applytablesettings.pl run to include the updates to the correct tables if updating from 2.50

- Removed the invalid farm_food setting from the racial setting scripts
- Added a third hero bonus option to the strategy editor
- Fixed a bug where new versions of perl would not have certain buttons like extract and insert working
- Added a new global setting to turn off the surrender system of AMAI
- Updated grimoire implementation to 1.2 and sorted out DE executable system to reduce the overall file size. The last compiled version can be run using the AMAI_TFT.exe in the scripts folder.
- 3 global settings added, major_hero_skill_value, minor_hero_skill_value and rare_hero_skill_value that are the prorities amai chooses a one of three skills when trained. major skill corresponds to the first skill, minor to the second, rare to the third line.
- AMAIvsAI edition is now compatabible with both TFT and ROC. In the race.txt file the third column will contain the blizzard entertainment scripts. When compiling this version it will now report for you if the blizzard entertainment scripts are incompatible with any custom changes you have done to AMAI.
- Healingitems.txt has some new columns which were introduced due to make healing pots and scrolls work more effectivly.

AMAI MANUAL ERRATA

- Improved Job section part of manual
- Information added on manipulating the commander system in custom maps
- AMAIvsAI section updates

News in 2.50c from 2.50b

AMAI ENGINE IMPROVEMENTS

- Fixed some major issues limiting night elven play where they wouldn't build wisps
- Fixed issue where night elfs would have invulnerable wisps in there mines
- Fixed some issues with night elf expansions being attempted after it failed
- Fixed some issues with focus fire selecting invisible and hidden units

News in 2.50b from 2.50

AMAI ENGINE IMPROVEMENTS

- Fixed a major issue which resulted in taverns not being able to be used as well as other neutral buildings
- Fixed some issues where dead units were being used to buy stuff
- Fixed some buying issues from taverns and item shops
- Fixed some major memory leaks
- Fixed an issue that caused some extra unnessesary start lag on the large maps
- Pathing controls start a few seconds later to help reduce start lag affecting pro players on large maps

News in 2.50 from 2.43

Final Stable Release

The next version of amai has finally reached a status worthy of a stable release. This has been a major project which resulted in massive changes to the underlying code. This is the first major update to amai since January 2005 where the new year edition was released. I would like to give my thanks to all the play testers of the betas who helped make this final release possible. You guys provided a wealth of valuable information and suggestions that made this possible. See you all again for the development of 2.51 ;) and have fun playing warcraft.

This massive release features a wealth of improvements and bug fixes. Due to the amount of bugs and changes made it is unfeasible to list every single possible change ever made so below lists most of the major improvements from 2.43. If your upgrading your custom AMAI read the developer edition change log below for help but due to the amount of changes it will take a bit of work to get working.

NOTE: Certain languages have not had all strategies totally translated yet. Please visit the forums for information about this.

AMAI ENGINE IMPROVEMENTS

- Improved defeat conditions where profiles will give up or fight to the end.
- The Start Lag of 2.43 removed and a whole new pathing calculation system is in place which is fast and effective without the lag. Also in turn fixes bugs of trying to use unpathable neutrals.
- Loads of Strategy improvements and tweaks to further enhance amai.
- A much more efficient ghoul lumber harvesting system.
- Small tweaks to try and improve overall team play with each other.
- The way gold mines are chosen have been improved to choose out of the the closest mines instead of sometimes always picking mines near enemy locations.
- AMAI can now make much more effective use of Millitia expansion, Tower rushes and ancient expansions.
- Undead now can build necropolis at expansions.
- Mana fountains can now be used by AMAI.
- Improved the army tracking systems to be more accurate and less error prone.
- Improved retreat systems with more aggressive profiles less likely to retreat in combat.
- Major new micro management of units with correct usage of racial shops to heal units.
- Improved focus fire systems which also includes focusing fire on enemy structures and wards.
- Fixed many teleportation issues
- Fixes to the core attack systems of AMAI
- Fixed multiple zepplin usage bugs
- Much improved hero selection
- Portuguese and Norwegian languages now included in AMAI
- Multiple problems fixed for the ROC version of AMAI
- A new AMAI version allowing play against both AMAI and the original blizzard ai at once.

ENGINE FIXES FROM 2.50 Release candidate 2

- Fixed a calculation error of players strength for rushing
- Improved calculation speeds of pathing systems to fix issues on certain maps where certain neutral were not calculated unpathable early enough.
- Fixed an issue where night elf would not give up sending there wisp to build an ancient expansion
- Fixed an issue where invisible units could be used to exploit amai into defending its town
- Fixed multiple major memory leak issues
- Fixed a bug in teleport to nearest ally ai town
- Fixed a bug in militia expansion where it would suicide the creeps with all its peasants if its initial wave was stopped
- Fixed a bug where blizzard ai's built multiple town halls, couldn't expand correctly and had some conversion issues.
- Massive language update check through to see what really needs translating or not
- Wheel of Chaos map is now confirmed fixed as to AMAI being able to play fine on the map
- Fixed bug with focus fire controls where they were not be followed at all
- Tower rush is now more likely to occur at nighttime to take advantage of decreases sight.
- Chinese language has been disabled due to needs proper translation.

AMAI DEVELOPER IMPROVEMENTS

- AMAI common.ai now nativly supports scripts made in the world editor and original blizzard ai scripts. ( There is only one possible issue that can occur with pure custom scripts please see the AMAI vs AI section for details )
- AMAI simple edition now uses grimoire to run AMAI which allows support for running warcraft with parameters and enabling the debugging tools.
- Debugging tools of AMAI have been greatly improved with a new system that displays debug info above the unit in question instead of spamming text screen with messages causing a slow down.
- minimum and maximum is now superseded by Min and Max function calls.
- DisplayToAllDebug function is now called Trace but no functionality has changed.
- Added 'mine' type that determines version gold mines to standardunits.txt.
- Added 'lumber' type that determines the drop off point structures so they are built next to trees to standardunits.txt
- Added 'zigg' type to determine structures that are ziggurats to standardunits.txt
- DefendsTownCond now has an extra parameter max_dist
- Instead of using the disable retreat setting a new text file called standardaisettings has been created that allows you to modify all the blizzard controlled settings (ones that appear in ai editor) including disabling unit retreating etc. You can also see which settings are controlled by AMAI and changing them will not make a blind bit of difference.
- A new advanced upgrade function has been added.
  BuildAdvUpgrade([quantity], [upgrade], [start tier],[unit count],[start unit count],[tier start count bonus],[tier prority bonus],[base priority])
  This function will build upgrade when unit count greator then the start count with a prority of (base priority * unit count). It only takes affect at the designated start tier and then builds at first 1 only, then increases every tier till it reaches the quantity level specified in the function. This function adds dynamic approach to upgrades so AMAI does upgrades based on the number of units.
- Added a compile AMAI vs AI version button. This compiles the TFT version scripts into the AMAI vs AI executable. This means tweaks you make to AMAI you can then test out your own tweaks easily against the standard AI without doing the long route of using an MPQ tool manually. (And to be honest it was getting annoying for myself)
- Improvements to the heroes.txt. Has extra first hero, second hero, third hero bonuses for each hero. This provides more power for hero selection to make more accurate accurate hero choices by AMAI.
- MassHealing.txt file has been replaced with the new HealingItems.txt file. There are 4 types of healing items available. HEALINGITEM_MASS, HEALINGITEM_SINGLE, MERCHANTITEM_MASS,HEALINGITEM_HERO
- New profile surrender value which has settings between 0 and 4. 0 is the default blizzard value in this case never gives up. While 4 means the profile gives up extremly easy. 1 is the original surrender system for amai.
- A Global setting has been added which provides whether or not this amai version has heroes. Turning off will not prevent heroes from being trained as such if its in there strategy but it makes attack assaults not wait upon a hero.
- A Global Setting added that turns off the blizzard controlled retreating. This is only useful for amai's that are used with units of extremly low health where such retreating style is not effective.
- A global Setting to set all computers to have the name "Computer" instead of their profile name.
- Fixed a bug related to having an empty UnitEquivelence.txt file which caused the compilor to complain about a missing endif.
- Maps that use the set custom value of unit native or coressponding trigger are now compatible with amai.
- Level Strength Map text file has become redundent and is no longer used due to enhanced strength calculations.
- 3 new global settings have been added for the strength bonus that is added depending on if a creep camp is minor or major.

We have made some major improvements to amai code as stated above. Therefore to allow your customized 2.43 amai to work in this new version you will need to make the following changes.

- The "SetBuildUnit" "SetBuildItem" "SetBuildUpgr" commands are now "BuildUnit" "BuildItem" "BuildUpgr" respectively.
- The reference to a hero e.g. hero_id[1] or hero_id[2] is now references as hero[1] or hero[2]
- Then click the applytablechanges.pl to create the nessecary variable additions to tables. (Note some global settings do not get added correctly so you will have to compare manually)
- These only affect AMAI code. The reason for the changes is to allow the standard blizzard ai codes to work. Therefore "SetBuildUnit" would call the standard build code which will cause issues if called in AMAI scripts.

AMAI 2.50 Beta Changelog

RC2 UPDATES

AMAI ENGINE IMPROVEMENTS

- Fixed multiple major crash bugs.
- Fixed an issue where creeps would make an expansion appear taken by an amai player.
- Fixed an issue where hero would teleport home even though they are winning the battle.
- An improved town threat mangement system has been implemented to make amai decide how best to approach a situation better.
- Fixed an issue where creep camp calculations where incorrectly calculated
- Reduced minimum attack strengths in multiple profiles
- Fixed an issue where militia expansion attacks did not have enough rescources afterwards to build hall
- Fixed an issue with tower rush where one peon would run straight into middle of enemies base resulting in death
- Missing strategy information for english translation filled in
- Added Norwegian and Chinese languages (Unknown if chinese translation actually is working)

RC1 UPDATES

COMMANDER IMPROVEMENTS

- Commander text website links updated.
- Fixed missing Undead:S in language translations

AMAI ENGINE IMPROVEMENTS

- Optimizations on placement of fast expansion code is it calculates before the pathing checks.
- Balance adjustments to upgrade researches so certain upgrades are more likely to be researched.
- Fixed an issue where there where missing requirements and needs for the hippo rider.
- Reduced liklyhood of tower rush in ffa type matches.
- Fixed an issue where rocket tanks had some missing needs
- Army now only coordinates with tree of life in an ancient expansion attack if creeps are weaker.
- Fixed an issue where only 3 peons could mine gold at starting mine instead of 5.
- Goblin tanker now chooses rockets above pocket factory due to bad usage of factory by amai.
- Reduced chance of dryads being used against enemy peircing units
- Reduced front radius to 900 down from 1100
- Fixed an issue where natures blessing is never researched
- Fixed an issue where lumber mills would not be built next to lumber stores
- Disabled some ineffective harass attacks
- Fixed the buildatmine function which was not working at all. You should notice this being used by orcs and undead.
- Fixed an issue where ziggurat selling was broken
- Strategies now only change to strategies that have 20% more priority than the current strategy. Prevents changing to strategies when there is no need as current strategy is pretty effective.
- Fixed an issue where an extra farm was built at the mine than needed
- Fixed some missing key upgrades in undead strategies
- Small tweaks to focus fire code to improve its effectiveness
- Fixed a crash that could occur in the building loop so ai would stop building at all
- Fixed an issue where a peon could not be obtained to do racial strategies
- Fixed an issue with the pathing scan where it could fail so amai could never expand to a mine.
- Fixed an issue where amai would start building at expansion before all creeps had been killed.
- Optimizations to the pathing scan to increase its calculation speed. Especially for larger maps which generally take much longer.
- Fixed an issue where amai only wants to build an expansion for a few seconds
- Strategy tweaks so anti stength values are more accurate
- Fixed an issue where healing ghouls would switch between cannablizing and harvesting wood.
- Fixed an issue with the scroll of healing usage so hero now waits for the units to be close by to him before using the scroll
- Major change to the way advanced upgrades work to fix issues in the upgrade priorities getting to high that they supersede everything else and preventing tier upgrades.
- Change to hero bonus strengths. In general they have been reduced.
- Calculation of hero strength now degrades when hero is hurt.
- Preventions made against the tree of life in ancient expansion failing to entangle mine and joining the ai's army instead.
- Fixed an issue where tree of life in ancient expansions would unroot when enemy forces are close by.
- Distraction attacks now require 3 times the amount of forces up from 2.
- Fixed an issue where computer would stop doing anything when only 3 units where harmed. They only do this now if the overall army is hurt.
- Fixed an issue where racial shops would not be built.
- Fixed an issue where amai would use neutral buildings before guarding creeps had been killed.
- Fixed crash bugs in ROC version
- Reduced town threatened radius to 1500 down from 3000.
- Orange creep camp strength bonus increased to 2 from 0
- Fixed an issue where a certain micro hero rule was using the overall player strength instead of strength in the vicinity of hero
- Reduced the teleport threat distances.
- Fixed an issue where item jobs all counteracted each other so hero would get confused and wouldn't buy the items.
- Fixed some calculation errors in the peon builder system.
- Fixed a rare bug where amai loses its targets position as target killed so never exits attack
- Fixed an issue where units would go back to attacking creeps when a town is threatened
- Fixed an issue where player would finish its attack before killing all buildings in the area
- Unit strength calculations are now the average of the units level and food. Not the sum.

BETA 9 UPDATES

COMMANDER IMPROVEMENTS

- Fixed some commander text that still was pointing to wc3campaigns
- Blizzard.j was not using the 1.20 patch data and was missing certain functions so could cause issues if maps used 1.20 only functions.

AMAI ENGINE IMPROVEMENTS

- Fixed zepplin issue that could occur causing zepplins to constantly pick up and drop unit its supposed to be unloading.
- Heroes now have bonus strengths depending on there harassing abilties and relative strength. So with those heroes and an agressive profile they should once again do single hero harasses or go straight to creeping instead of sitting back waiting.
- Fixed some pathing determination issues on large maps..
- Fixed some grave errors in profile strength calculations where some unit types where calculated twice making computers appear stronger and profile choice would be further biased.
- The new retreat system has been improved to take account of the profiles aggression. The higher the aggression the more enemy units needed to make the computer retreat.
- Fixed an issue related to ghoul harvesting when wood rescource was low the attacking ghouls would be set to only 4 no matter what. This meant the ai's strength would also be incorrectly calculated as low. Now it is changed to be max 4 harvesting. The ghouls will still all harvest when no attack is running.
- Fixed two amai script crashes when buying neutral units or items.
- Missed a defend town code that didn/t have the knew let it die detection features in
- Militia Expansion systems have been further improved and optimized. The militia sent will stay up there a build the hall. This dosn't include fast building it. That has yet to be optimized.
- Fixed some strategy comflict issues with tower rush preventing tower rushes from working.
- Ancient expansion has been completly re-worked and has had millions of bugs fixed.
- Town hall human fast building has been modulised into a job in preparation of making it work for any building you wish. (This is to allow humans to be extremly effective at quickly building up base hopefully in the future when have loads of resources)
- Fixed an issue where illusions where being healed and treated as real units. This should prevent AMAI trying to save illusion units.
- Militia expansion chance increased to 60% from 40% due to much smarter behaviour.
- Fixed an issue with AMAI not using moonstones or orc healing pots.
- Fixed an issue where AMAI wont retreat to save his threatened town.
- Fixed many issues with the core attack systems.
- Improved behaviour when town is threatened.
- Fixed issue where ghouls wouldn't harvest wood moment they researched cannabalize, even if no corpses available .
- Fixed an issue where AMAI would do distraction attacks when creeping.
- Fixed an issue where if no pathable goblin merchant is available, AMAI will never buy its own shop items.
- Undead will now build necropolis or graveyards depending on how far away mine is and its amount of rescources. This is to try and prevent issue of undead running out of wood as ghouls just stayed at main base to harvest.
- Undead now go to goblin merchant to get healing scrolls if its not tier 3.
- Tower rush percentages have been increased for further away bases. 33% for really close, 25% for close, 16% for far, 7% for furthest allowed distance away. Tower rush also now ends if the player being rushed is defeated.
- Ancient Expansion probability is now 43% up from 33%
- Fixed an issue where distraction attacks would occur even if units where in critical states
- Fixed issue where racial_expansion was used in non undead scripts. This variable now works for non undead scripts
- When hero goes to buy a emergency healing item,. he can now buy and use other items if he can't get a healing potion.
- Fixed an issue where the creeps guarding mine locations had there strength incorrectly calculated.
- The mine calculated for fast expansions has a 25% chance of choosing a second mine that could also be used.
- Town threat no threat distance is now set to 3000 from 3250 to try and reduce effects of an issue on maps where bases are really close together that makes AMAI always think its base is threatened. This is only a temp fix. The army control systems will either just need more global setting changes or a re-write.

BETA 8 UPDATES

AMAI ENGINE IMPROVEMENTS

- Fixed an issue where language selection does not work it is always english. (cause was due to too many threads, had to merge 2 threads together as warcraft only supports 5 threads before reusing old ones)
- Fixed an issue where nightelf would not harvest from expansion gold mines.
- Fixed issue on large maps with multiple taverns an issue where it could not detect a tavern. This resulted in it training a normal hero from its altar as replacement and is what caused the heros not choosing skills due to unfixable limitations. This should no longer occur. (custom maps with unreachable or guarded taverns will still result in the normal replacement hero being trained who will still have no skills. This issue is unfixable due to limitations in the script core)
- Strategy upgrades have been further reworked with new dynamic upgrades by implementing a new build advanced upgrade function. These are upgrades that are built based on the number of units. So if amai has alot of priests, amai is more likely going to do the priest upgrades. Also fixed an error with nightelves strategies as it was using a badly implemented testing dynamic upgrade system and wasn't working well.
- Fixed issue where micro scripts failed to check as regulary as before. I had left some values from tests so by next check unit would already be dead so resulted in computer losing too many units early.
- Reduced the distance that AMAI can do a militia expansion to 6500 from 8000 as i have tested and this seems to be the best range where militia expansion attacks are more succesful as the mine isn't far away.
- Increased focus fire melee distance from 80 to 200 so that focus fire in melee has a better surround attack, not increased too high though so that melee units suicide themselves trying to attack a unit it can't reach.
- Increased flee health percentage from 0.25 to 0.3, this is more in line with when the invisibility spell is cast by blizzards hardcoded systems to protect units.
- Fixed an issue where focus fire was only running for units that needed healing. Its now the otherway round as it should be. Also made improvements in detection of units and better detection of immobilised units and buildings.
- Made some improvements so computer can focus fire on immobile units with higher prority, and can also focus fire on buildings
- Fixed error in code for building shredders if boolean race_use_shredder enabled.
- Added a micro hero rule so it dosn't waste a town portal when hero is dying and only 1 or 2 friendly units left. (Should fix issues when hero townportals while creeping)
- Fixed an issue in night elf strategies where it was heavily building units that are not actually a part of the strategy, so in effect the actual units from strategy dont appear to be built because these other units had higher prority.
- Other racial strategy improvements to fix issues such as amai ending up always picking the similar strategy. e.g. human would nearly always build sorceress every game so building the counter was all that was required to win
- Fixed an issue where focus fire was incorrectly calculating its own range strength by including dead ranged units .
- Fixed an issue where heroes would still buy items from the goblin merchant even when town was threatened and also improved so heroes will not buy items when they are in an attack. Loss of an important hero when attacking is a bad idea.
- Fixed an issue where if the other hero was in the selection of the shop and another hero wants to use the shop it cant as selection was on another hero.
- Fixed issue resulting with AMAI still creeping air creep camps with insufficient anti air units.
- Improved town defense so it wont continue to protect an expansion if enemy slaughtered his army.
- Fixed issue related to AMAI retreating from battle but then changing its mind while being chased. Now fixed to make AMAI return home. This only occurs when AMAI retreated, otherwise it chooses its next target like usual.
- Increased the priority to build the emergency healing items when army needs healing. Hopefully will fix issue of orc AMAI players not healing its army.
- A load strategy improvements including merging of particular strategies which where just repititions of others in some form.
- Added improvements to amai team play so that team follows a lead AMAI player. If that leader dies than the team leader switches to someone else. This fixes some of the messy behaviour in team play and keeps them working together in unison as well as being able to still take care of themselves.

MANUAL ERRATA

- Updated manual sections with new functions and changed the play standard ai section into a AMAI vs AI category

BETA 7b UPDATES

AMAI ENGINE IMPROVEMENTS

- AMAI now has the added potential to actually focus fire on non attack wards e.g. healing wards.
- Fixed issue related to AMAI double town portalling to his base in times of need.
- Improved cannibalize usage when sending units home to heal. Basically will get them to try and eat any nearby corpses at the base.
- Improve healing code for ghoul type units so that they go back to cutting lumber while they heal.
- Fixed some issues with the harrass and detection of massive enemy armies.
- Fixed some issues with the harrass and tower detection.

BETA 7 UPDATES

AMAI COMMANDER IMPROVEMENTS

- All units and computers are paused while players choose a language option.

AMAI ENGINE IMPROVEMENTS

- Improvements to Hero Selection by AMAI so they choose heroes that better resemble the current battle.net going on's more reliably.
- Improvements to Strategies including some new anti racial strategies and strategy priority. Will use more varied selection of strategies for the initial strategy. Also AMAI can once again do fast techs and they are also much faster and more effective than they used to be when they were working.
- Fixed small bug where units going home could freeze on the spot.
- Zepplin code has been updated fixing odd zepplin bugs and works correctly with the new micro systems.
- Revised the disabled heal army code to re-enable the mass healing items and to not do an attack until the critical condition army is healed. Also added code for nightelfs to use moonstone to refill moon wells and force orcs to use there healing salve in the healing situation so that they heal effectivly and do not just stand around waiting for there health to regain naturally.
- Fixed bug in the retreat army code resulting in it not working properly and also made some small improvements where will overide the blizzard calculations and retreat straight away if in a vastly losing situation. (otherwise did fighting to the death fighting and having to micro all its units home then get wiped out) Will also aid in preventing amai's army being spread too thin.
- Fixed a Focus Fire Bug which made focus fire not work correctly.
- Fixed Undead crash bug in the micro units code that kills the undead player job system. Smart Statue control has therefore been disabled till it can be reactified.
- Fixed a issue where Zeppelins would try to pick up flying units.
- Fixed an issue where Zeppelins would try to pick up dead units.
- Improvement to Ghoul Lumber harvesting so there is always 1 ghoul harvesting even when it sends all ghouls. Otherwise causes some issues with lumber needs.
- Increased the chance that the human player will do a militia expansion .
- Improved night elf usage of hide when saving dying units. Should hopefully improve cloak of shadows item usage too.
- Major memory leak issues in micro unit and micro hero job codes fixed.
- Added fixes that hopefully aid in prevention of army rallying to point where amai loses its heroes.
- Fixed issue where heroes teleported to defend base even though they were closer than the high_threat_distance. This wasn't when the hero was dying.
- Fixed issue where if the expansion peon to build town hall dies than a new expansion peon could be chosen from the base which was ineffiecient.
- Fixed issue where amai would do an harass attack when his town was threatened.
- Added 9 strength prediction rules to AMAI
- Fixed issue with militia expansion where it would choose a peasant from far at base. The fast build also has been improved to choose the nearest peasants too instead of those at the base.
- Mass Healing item control has been improved to encompass all manners of healing items including the orc pots and scrolls from merchants. This improves the healing process of army especially for orc ai players.
- Fixed a bug that could cause the job system to crash when a unit that was rendered immobile trys to be microed.
- Fixed a bug where the AMAI would stop building past a certain point if it required a tavern hero but tavern is not reachable. Now AMAI will dynamically re-choose a standard hero instead.
- Fixed issue where AMAI would enact a town portal spam.
- Reduced the strength bonuses applied to orange camps from 5 to 3 and red camps from 10 to 6
- Hopefully Fixed an issue relating to players trying to town portal to a town that is still under construction and resulted in army just townporting to his home town.

MANUAL ERRATA

- Fixed some information errors in the reference section. Updated the known issues subsection to be more accurate

BETA 6 UPDATES

AMAI ENGINE IMPROVEMENTS

- Removed the old heal army function call which would heal the army when preparing an attack. This would cause army to return home as not till the healing phase had finished, would attack occur. This bug affects large armies more. Also this could clash with the new job system version of healing units.
- Undead uses moon wells on by default. Who knows why. Its now turned off.
- An improved micro units home system by using a job system, allowing them to stay under ai control while at home base (so they can defend if needed) and hero will intelligently use shops to get its racial healing item (if a merchant item will go to nearest merchant)
- Fixed certain issues where AMAI would declare defeat falsly.
- Fixed an issue related to the ai giving up and its buildings not being destroyed.
- Some tweaks and improvements to the AMAI expansion system. Improved choice expansion.
- Fixed issue where Micro Job works on peons effectivly disrupting there rescource collection routine.
- Improved hero detection so micro occurs around the correct hero in the fight.
- Small Tweak to strength needed to fight creeps.
- Fixed issue related to heros getting stuck as not available (due to they are apparently healing). This could cause attack sequence to fail.
- Tweaked liklihood of ancient expansion and tower rush to 33% down from 50 and 40% respectivly.
- Tower rush like ancient expansion will only occur with 2 possible heros instead of any hero.
- Fixed the issue where units are sent to attack and point continously. This bug came back from the dead, hopefully fixed again now.
- Increased range of call to home so units not called home early so can't defend base out edges.
- Fixed issue on large or unique maps where the computer would not know about the existence of far away neutral buildings.
- Fixed issue where advanced unit micro systems where disabled.
- Full Threat distance reduced slightly to not pick up armies extremly far away and try to defend against them
- Fixed strength levels for teleport settings. It had not been updated for the new current strength system

BETA 5 UPDATES

AMAI ENGINE IMPROVEMENTS

- Fixed many memory leak bugs from old code sections.
- Fixed code duplication issues that was caused by having the same function repeated but would remove the location or group passed to it. This makes making changes complicated. All destruction of local variables should be done in the function that it was declared in.
- Fixed an issue that was causing the ancient_exp_loc variable to be cleared instead of kept so ancient expansion issues would occur.
- Fixed an issue with ancient expansion that could result in the tree of life to never unroot and was stuck in some bad position
- Increased detection radius of heros near the ancient expansion tree so that it will start attack earlier.
- Increased ancient expansion distance from mine. On some maps it was still too close to the creeps and was detected by them.
- Debug messages for ancient expansion always came up even if debug setting was off
- Fixed an issue in ancient expansion that when mine was undefended, computer would keep sending wisps to build tree of lifes at the mine spamming tree of lifes everywhere.
- Fixed an issue with AMAI attacking center of map. This issue did not really affect beta 4 but was present just never activated. Was to do with an incorrect variable being set to null.
- Fixed issue with AMAI ancient expansion where army would regain control to other things so effectively would abandon the tree of life behind to fight on its own.
- Fixed an issue where strength levels picked up hidden units (i.e. used by custom maps and certain AMAI calculations). This messed up the strength system and now should no longer think army is really strong.
- Fixed issue where units to use mana fountain wouldn't lose there guard position.
- Fixed issue where tree of life would not uproot.
- Portuguese Translation has been implemented (thanx to Imba)
- Small improvement to micro hero home code to make them go to the nearest own shop for a nice healing potion etc.

MANUAL ERRATA

- Small Updates parts of the manual. Added installation instructions for all the versions. (HEY did you know AMAI now has 68 pre-defiined strategies)

BETA 4 UPDATES

AMAI ENGINE IMPROVEMENTS

- Fixed a major bug that caused neutral tree of life to just spawn constantly at expansion when race was doing ancient expansion and no creeps were guarding the mine.
- Fixed an issue with the moon well control with it not calling correct job so could end messing up the job system.
- Fixed issue in ancient expansion system so that units that took part in ancient expansion and the expansion building dont become frozen at the expansion till the expansion is re-built.
- Changed handling of ancient expansion slightly. Before the expansion would only use the one type of unit to aid. This could be damaging as it would inaccurately mesure strength against creeps as most units stay put and risked life of the tree.
- Human towerrush disabled until we can create a new repair system to fix the blizzard bug of sending every peasant to repair a building when its builders are killed. (if you want it back on you can turn on in develper human settings)

BETA 3 UPDATES

AMAI ENGINE IMPROVEMENTS

- Fixed a bug with creeping making them constantly attack creeps too strong for them.
- Fixed bug in the system to prevent units returning to base when creeping.
- Heros should not buy items from merchants if not dying and town is threatened.
- Added some prevention of base running out of lumber cutters mainly for elves when they own 3 mines at once.
- Found a separate instance of fountain usage separate from the job which dosn't have all the bug fixes in and explains alot of problems i've had testing.
- Fixed issue where units would freeze and never move. There were multiple bugs that were causing this and should now be fixed.
- Army can now focus fire in base defense instead of just when attacking.
- More retreat code bugs fixed.
- New save unit features: using moon wells with mana till unit/hero is healed and heroes buy health potions in emergency and use them straight away instead of not buying anything till attack finishes or waiting for hard coded blizzard ai to kick in. This feature is an early code layout for a more advanced item usage/micro system.
- Fixed an issue with buying heroes from tavern where it started using the wrong job so an old bug returned.
- Moved micro unit code out of retreat code job like the focus fire and should improve unit micro.
- Added check to fountain usage to make units run away if creeps are awakened by someones attack.
- Added difficulty ranges to fountain usage. Insane difficulty cheats and knows if enemy is there while a normal difficulty will run away when it sees enemies near fountain.
- Ancient expansion won't be done if mine not guarded and instead becomes a quick expansion.
- Fixed an issue with humans where if tower rush is true and millitia is true then human players got messed up at start. Also moved tower rush attack code into single melee attack which removed some problems in not creeping.
- Zepplin usage seems to be functioning correctly again without any input from myself. Side effect of fixing another bug somehow?
- Improved mana fountain integration with micro systems. (I can now say on maps which only have the mana fountain i have seen this used alot more so was able to fix noticeable bugs and such.)
- Aiandies old pathing is now fully obsolete. The new system is much more simple and effectively start lag is no more and still works in calculating front positions for towers, nearest mines, nearest shops etc.The old system was a great peice of code but it was not effecient especially when being wasted on simplistic tasks.
- Fixed issue with towerrush for computer(normal) where the amai would not build a hero so the towerrush becomes a disaster.
- Fixed some freezing issues with militia expansion.
- Added new function for calculation of anti air when fighting creeps and updated strength requirement to prevent needless attacking of air creeps when it didn't have the men.
- Fixed a bug in the expansion system that could at start of game cause AMAI to use for one time only a bad expansion location i.e. not reachable or too strong
- Improved AMAI's handling of deciding on mines to expand to that where owned by undead as before it always checked as not taken even if base defence was present at an undeads expansion.
- Improved the expansion system to take into account if it needs to re-build a destroyed mine. If the town hall is destroyed but its towers or other buildings remained intact it will have a higher prority to re-build expansion there then build an expansion somewhere else. It can still build another expansion elsewhere. Depending on feedback we can make it so AMAI always re-builds in this case before anything else.

BETA 2 UPDATES

AMAI ENGINE IMPROVEMENTS

- Tower Rushing has been updated and now works for orc players. You can try enabling for human but does not work effectivly for humans due to the way they build. We require testing that all features are working correctly
- Mana fountain usage has been introduced. This feature is not used often as healing fountains prefered but it can occur if computer wants too.
- Fixed a bug in the calculation of hero strength. It was adding the ultimate strength bonus only when hero had a level less than 6.
- Improved Strength Calculation systems to be based from food and level instead of just food to improve creeping reliability and incorrect creeping which noticeably developed.
- Ancient Expansion system fixed
- Millitia expansion system fixed
- Fixed some Zepplin usage bugs
- Gold mine expansion system updated to pick pathable mines accurately and has percentage chances of picking certain mines. We will modify prority of picking certain mines depending on your tests.
- Computers no longer try to use un-pathable shops/fountain
- Added a single hero micro rule to not use town portal if armys in a definate winning. This only works for big advantage. Still work needed for small advantages.

BETA 1 UPDATES

AMAI ENGINE IMPROVEMENTS

- Improved Defeat Conditions - They are more advanced and each profile has a surrender value to set how easy it is for them to give up.
- Fixed some retreat bugs.
- Fixed some fountain usage bugs.
- Game Start Lag has been greatly reduced.
- Tweaks for 1.18 patch
- Tweaked Unit Strength measurements (TFT only)
- Strategy Improvements and 5 new anti-strategies included per race (TFT only)
- Fixed/Improved ghoul lumber harvesting
- Front computation is now more accurate
- Slight Improvements for Team Game to teleport to the nearest allied base

News in 2.43 from 2.42 - New Year Special Edition 04-05

- Featuring a nice new year chat greeting from AMAI (Special feature for this edition only)
- New tower placement system and options added to developer edition for it
- Other optimizations

News in 2.42 from 2.41

- StrategyManager now has one additional compile button for making an optimized compilation of the files for a final release. This will make the files much smaller but forget about using the optimised ones for debugging since the code will be hard to understand.
- This optimization will reduce size of the PE and SE releases from now on and will also make AMAI consume less CPU power
- Bug making lock strategy not working fixed.

News in 2.41 from 2.40

- All jobs are now in external files containing functions and globals, they are all declared in the list file 'jobs.txt'.
- Undead can now use DefendTownsDone without causing any bugs. there is also a new version of DefendTownsDone function yet untested with some conditions for making different defence depending on the stuation, will be used in next official AMAI.
- Some new settings for the new feature making undead sell defence buildings that isn't defending anything.
- Compiler now works more than 5(!) times faster.