AMAI icon indicating copy to clipboard operation
AMAI copied to clipboard

Inventory filled with useless items and wrong assessment about items' value

Open Pixyy opened this issue 3 years ago • 1 comments

Sometimes, the evaluation of items is obviously wrong. For example, a hero once threw his potion of invulnerability on the ground and ran to Goblin Merchants to buy a potion of lesser invulnerability. But the bigger problem is that AMAI overestimates the value of low-level items and will always hold them. This will only take up space in the inventory for nothing. For instance, AI's hero will never use the function of some items, like Cloak of shadows and Crystal Ball. These items are completely useless for AI's hero and cannot give any buff. It's better to sell them rather than hold them forever. But AI's hero seldom, if not never, sells these kinds of items to make room for inventory.

The next problem is about insisting on holding poor items. Some items are unimportant for certain heroes, for example, Gloves of Haste and agility+3 shoes for the non-agility hero. These low-level items are not totally useless, but it's clear that in the late game, these items should be replaced by more useful items. In the late game, heroes will kill creeps much stronger than what they killed in the early game, which will bring more useful items than before too. But AI's hero might still carry those low-level items during the whole game and ignore more precious items. And the full inventory filled with low-level items will prevent heroes to buy more healing items from the shop.

I checked the files in the AMAI folder, only found some codes in StandardAiSettings.txt about buying and taking items. The default setting is: SetHeroesBuyItems not isNewbie //Heroes attempt to buy useful items from shops (NOTE: this is the blizzard controlled item usage) SetHeroesTakeItems true //Ai attempts to pick up items left on ground

It's not clear how AMAI control heroes selling items. Enlighten me if there are some files related to this.

I wonder if there is a way to let AMAI control heroes sell and re-evaluate items so that they can make full use of their inventory and economic advantage. Sell the useless item and buy/pick up the useful one.

Pixyy avatar Aug 06 '21 13:08 Pixyy

Team Healing Items should be at least set to a very high priority, if not the highest. AMAI's micromanagement is great. Lots of low hp units can flee the front in time and survive. But it will cause many units with low hp to gather at home and wait to recover slowly. It's essential to short this waiting time by using healing items. The best way to solve this problem is to buy more scrolls of healing, especially for insane AMAI who has lots of money to spend. Use scroll of healing to restore the team and fight again in a short time. Convert economic advantage into item advantage and army advantage. It will significantly increase AMAI's ability by letting it make full use of the double economy. So AMAI's hero needs to sell useless items in time to make room for healing items and other valuable items.

Pixyy avatar Aug 06 '21 13:08 Pixyy