| 07-25-2004, 01:09 PM | #271 |
Attacking expansions above all else is not really a good idea against a good player. But in your case if they rarely go on expansions at all then there is some other problem involved. Have you seen them expand to all expansion points (actually build an expansion there). If not then there might be a problem with the pathing to the expansions. The other things that might have them not expand have already been mentioned. You use function DefendTownsDone takes integer qty, integer unitid, integer prio returns nothing to build defense at the expansions ? |
| 07-25-2004, 08:49 PM | #272 |
@Zeta09 "I don't believe my expansions are within the radius that you all spoke of above but all in all as peon mentioned it does tend to ignore the closest expansion and go further away." Exactly, thankyou. Anyway, I would try to reduce the radius first and see what happens... @AIAndy "Building placement is done by the hard coded AI so it would require a lot of work to do that in the script." Sorry for the problem. I raised this problem because I had an idea of AMAI treating all mines, no matter primary or expansions, as normal expansions, and re-used the functions build_sequences. If a needed building already existed, it jumped and checked the next one until it could build those necessary units. I tried to replace: call SetBuildUnit(1, TREE_AGES, 10) and call: function ChooseExpansion it seemed to work for once, but then it cancelled the build...I have no ideas -_- |
| 07-25-2004, 11:35 PM | #273 |
Goose: I will take a look at thoes hero priorities and adjust them. Besides this im working on some new strategies for each race that will mostly be used as base strategies to branch out to the other strategies. it's allround strategies based on every tier and on a small amount of different units and upgrades to not require to much teching that drains the resources for the computer. For example we now have a "Barrack Mix" strategy for Orc making it build a army only using units that are built in the barracks. but it will adapt it's army to counter the enemy army still. Enemy build air = AMAI throw in more head hunters. Enemy build ranged = AMAI build more grunts. Enemy build unarmored/towers = AMAI add more catapults to the mix. Have tweaked out and made lot of tests on this basic strategy and the results are very nice. Of course this strategy can´t counter everything adn it knows it's limits so it will still change to a better fitting strategy if needed, like the second base strategy for orc I added now "Bestiary Mix"(Now you probably know what that strategy does as well). But the normal strategies already there will of course still be used as well in cases when the enemy army got one strong kind of force that a specific strategy counters very well. Like a enemy with only grunts in masses will make the AMAI switch to a pure wyvern strategy or wyvern and shamans in this case. |
| 07-26-2004, 12:41 PM | #274 |
Thanks Zal :) My numbers aren't perfect so don't feel obligated to use them exactly. Mainly I reckon more Paladin/Dark Ranger (she's pretty good now) and Lich/Shadow Hunter with a 2nd hero bonus. The new strategy stuff sounds awesome - more adaptive. Can't wait to try it out :) |
| 07-26-2004, 01:37 PM | #275 |
@peon: I cancelled the build ? You mean it started building the expansion and then cancelled that building ? That sounds like the double expansion prevention thinking that that mine has already been taken by an ally. I see now that that old function does not use expansion_radius, but 1500. It is in GetOtherExpansionNearby. Try to reduce that value too. |
| 07-26-2004, 04:45 PM | #276 |
@AIAndy: Thanks a lot! I am going to try the radius ^_^. About the expansions, maybe as you said it found double exp and cancelled it. I just thought if amai could treat all mines equal, and built units and buildings only when needed, then a general function can be re-used by putting different parameters: Let's say, when it needs a huntress: -common.ai- function checkexistence (building name, ... ) function build (building name, radius from nearest gold mine, ... ) -elf.ai- function build_squence call function checkexistence, putting parameters tree of life, hunters hall... if missing the needed buildings (say tree of life destroyed), call function build, putting tree of life, 500(say) from nearest gold mine, ... Here the functions checkexistence and function build can be re-use. I just think your function ChooseExpansion could be generalized as a build function, but I am not sure how exactly it is working... @Goose Yes, Paladin/Dark Ranger are good, and I usually play paladin first. Actually I changed all racial heroes to 50%, and all neutral heroes to 25%. I am happy if I see a Lich as the first hero. Watching it playing itself is fun! |
| 07-27-2004, 07:13 AM | #277 |
Forgive my ignorance but AIAndy am I putting this command: function DefendTownsDone takes integer qty, integer unitid, integer prio returns nothing in the common ai or eai file and then does it matter where I put it. (Am I able to put it at the end or does it need to follow something else and then be referenced in each of the race ai files? Additionally do the integer uintid need to be specified by race or is that the exact syntax? |
| 07-27-2004, 08:51 AM | #278 |
buildsequence.ai which is under each of the race folders in the folder TFT. Add it to the global build sequence at the very beginning. |
| 07-27-2004, 09:17 AM | #279 |
You can also use it in a strategy in any tier. |
| 07-27-2004, 10:11 AM | #280 |
@AIAndy - Expansion Location: When fast expansion, it can expand in the near mines. When normal expansion, it can only choose those far away. Maybe normal expansion is calculated by the distance exp_d in ExpansionFormula: function ExpansionFormula takes integer exp_d, unit exp_u returns integer return maximum(20000 - ((exp_d * 250) - 4000) - ((GetLocationCreepStrength(GetUnitX(exp_u), GetUnitY(exp_u), expansion_radius) * 800) - 6000) + R2I((MinRangeToEnemy_d(GetUnitLoc(exp_u)) - 3000) / 3), 1) endfunction The farther the distance, the lower the return value. Also, maybe I am wrong. Should the valuables exp_dist and exp_unit instead of exp_d and exp_u? I couldn't find exp_d and exp_u declared in other places, so I thought it could be typing error. It also keeps sending workers to mines guarded by creeps without clearing them first. I think CheckFastExpansion doesn't GetLocationCreepStrength as in normal expansion. |
| 07-27-2004, 10:44 AM | #281 |
1. I suggest adding allied army tracking. Before attack, if there are allies, check where allies' armies are and where they are heading. Now AMAI doesn't give proper weigh to allied armies' positions. As a result it often attacks enemy teams alone (and often beaten). It's the last serious teamplay bug. When new check says “you are alone� AMAI would change target & and try to attack another team/player, if ally situated closer to it. Or, if there is only one good/possible target, insist on attack, asking player (if his ally is player) to move quicker and/or to be in earnest about this attack. While waiting AMAI may attack nearby creeps (not creeps near enemy!). 2. I remind you of an option in menu to share resources with AMAI teammates (once you wanted to do that). AMAI team you made a grade job! My old troubles with my own strategies & AMAI behavior at epic size map – gone away (b-bye bugs)! And other features of AMAI are fantastic! But unfortunately AMAI kills all other strategies for many people. I talk about new, high budget and long development projects. Their gameplay is pure in comparison with AMAI's in Warcraft III. You ruined them(no more bullshit!). I'm glad. You have raised quality of RTS AI for the whole world. PS When you make allied army tracking I shall write to the biggest Russian game site to make them announce and review AMAI. |
| 07-27-2004, 03:24 PM | #282 |
@AIAnday - Expansion distance works finally ^_^ I did the following steps: 1. Moved gold mines a bit farther (about 1000 distance) in my map 2. expansion_radius = 2000 creep_camp_radius = 2000 --larger number so that creeps nearby can also be detected 3. function CheckExpansion call GroupEnumUnitsInRange(g, GetUnitX(expa), GetUnitY(expa), 3*expansion_radius/2, null) changed to: call GroupEnumUnitsInRange(g, GetUnitX(expa), GetUnitY(expa), expansion_radius, null) -- 2000 should be enough, no need 1.5 expansion_radius Thankyou again for your help! |
| 07-28-2004, 02:40 AM | #283 |
@Tez: 1. The allied armies are already tracked (used in the threat computation too). It is just a matter of using that info for other things than defense. Should not be too hard to make armies wait for allied armies heading in the same direction if the defensive strength is too big. 2. Ah, I remember it now. It was for single player, wasn't it. Feel free to remind be of such things. I will add that tomorrow. @peon: Glad to hear that your problem is fixed. The variables you mentioned up there about the expansion formula are parameters of that function. |
| 07-29-2004, 05:27 AM | #284 |
@AIAndy "Ah, I remember it now. It was for single player, wasn't it. Feel free to remind be of such things. I will add that tomorrow." What does it mean: "for single player"? Will it be impossible in multiplayer (oh no!)? 1. Yesterday I've had an abnormal buggy game. Here is link to replay (map included). – 45:30, 48:50 Yellow undead makes lemming run to my right expand through my army. Ignoring me. Twice! Later, on the third time mine at my right expand was depleted, but it didn't bother undead. Everything repeated once more. – Violet human didn't surrender though he had no army, no mines and not enough money to expand (about after 40:00). – Blue human is idle after 50:00. This timeline included in comments to archive. AMAI 221 Beta 3 unmodified. 2. Function CheckDefeated needs serious improvements. For now, if AMAI has gold I've to seek for all left Town Halls & destroy them all while AMAI builds new (that is in my replay too). I suggest to add/replace with these condition: – Two teams left total – and 10 minutes of game passed – and summary food used by AI's team more then 7-8 times less than opposite force has. 3. There are a lot of cases, when AMAI retreats from battle but his enemy situated between it and base. And AMAI without any hesitations tries to get his way through enemy forces (so… only few of his units save). PS Replay has some hardcore battles (I've beat team of two 80 food AMAI alone and almost without casualties (violet Human & chlorine Undead), watch lower middle expand somewhere in the middle of game). Minimap didn't properly recorded. May be problem with AMAI ignoring my army - was in my army - it stood still. (I'm about army tracker.) |
| 07-29-2004, 12:16 PM | #285 |
I say single player because in multi player you can already give resources to the AI via the normal interface you'd use to give to other humans. If an AI does not surrender that is a sign that the job thread has crashed which needs to be investigated. |
