| 03-28-2011, 01:21 PM | #1 |
First of all I have to compliment all guys involved in AMAI project, really awesome job! I first knew about AMAI about 3 years ago and I was really surprised by the AI resourcefulness, way better than Blizzard AI (And we are talking about one, if not the largest, software strategy games company in the world! That's a proof of the grandness of this project). Anyway, I'm focusing now on coding AI to play with Human in the Strategy Editor on small 1x1 maps (EI, SV, TS) against undead. So I was wondering what would be the correct syntax that I should put in the initialization code to say to AI to: 1-Train Archmage 2- Train 5 footmen 3- Train 10 peons When all these parameters are met, the AM, his 5 footmen and 5 of his peon should change to militia and they all go creep the next gold mine to fast expand. Once the creeping is done, 3 of the peons builds a Town Hall and the other 2 peons each builds a tower next to the TH. Is it possible to be that specific only coding in the Strategy Editor? (which is an awesome tool by the way!) tnx in advance! |
| 04-14-2011, 03:07 AM | #2 |
45 views and not one reply... either my question is too dumb to deserve an answer or it is impossible due to hardcode issues. Either way, I admitt I'm quite a "beginner" programming AI and I barely had time lately to expend on it, mostly because of work and College (But I'm going to study more on the following months, since I'll have more time for it). I could say I have experience in games of the genre and I already watched hundreds of WC3 replays and played it on Garena mostly. I'm far from being considered an "pro" player but I have some grasp of its tactical and strategic nuances, and I think AMAI can be programmed to play way better and more human-like if just he followed some strict rules... but for as far as I tested AMAI, it is not possible to be so rigid, you can only set some vague tactics, specify some general characteristics of its gameplay and that's it! The rest is entirely up to the AI to decide when to creep, when to change strategy, when to expand and etc. Of course you can "influence" when AI should change it's strategy, but I think that the AI has a lot of freedom to keep changing it. And I think most of this is hardcoded issues but I'm not yet sure... For instance, I tried to program HU to tower rush TIER 1. It is a basic strategy of HU gameplay, on certain maps, can be difficult even to "pro" players to fend off this attack, just depending on how well are you able to micro your units. But for that to work out, the AI could not have so much freedom to "decide" to go creep instead of rushing for the enemy base. In short, I just wanna know if there is anyway to make AI more procedural: Some way to tell AI "When this condition is met, do this, only this as fast as you can! No time for creeping, no time for expanding, just do this", is that possible? Anyone who could shed some light here I would be extremely grateful! Tnx for your time! |
| 04-14-2011, 07:29 PM | #3 |
AI scripting is good at building up in the right order. And training units in the right composition. Issue one: Placement is never going to be like a human walling in. Check out the manual for information on some functions you can call. http://www.hornes.pwp.blueyonder.co..../Reference.htm You might be able to use the harass function to do a conditional rush at the opponents main, but i don't know if you can tell it to build towers at/around the opponents main. |
| 08-16-2011, 08:55 AM | #4 |
Sorry for being super late, hehe I kinda had forgot to check in here for ages. Its fun that you like AMAI tho while Im mainly sad that Blizzard shut down most editing possibilities of AI in Starcraft 2 so me and AIAndy couldent make a new AMAI there. :< What you trying to do however is very controlling, in a way the opposite of what AMAI do. the entire goal with AMAI is for the AI to be more dynamic, think for it self and not being controlled by a list of commands. Thats why it decides on its own when it wants to militia expand and such. I cant even remember if there was ever a command to order AMAI to do a militia expand, it really wouldent work becuse it doesnt have build orders like traditional RTS AI but just a list of goals it tries to complete as optimal as possible without any time reference. For example tho, if you want AMAI to build: Train Archmage Train 5 footmen Train 10 peons in a custom strategy you just enter: call BuildUnit( 1, hero[1], 50 ) call BuildUnit( 10, FOOTMAN , 50 ) pesants is workers and they are automated not even controlled in AMAI build orders. How AMAI will use these 2 rows of code is: It gets 2 goals, 1 hero + 10 footman with same priority(50) so ittries to find the best build order to complete these 2 goals simultaniously as optimal as possible, buildings workers and farms as it see fit or even expanding if it sees that a part of completing the goal faster. the Goal with AMAI was for the AI to have the I(Intelligence) to think and act on its own for most part. Just hope you wont be dissapointed but your problem is easiest solved without AMAI and just a normal build order. Its only the trubble of making the normal AI make a militia expansion it just doesnt have that feature. it took many days of testing to develope that in AMAI but it was fun and challenging and I think Strategy Master refined it even further. However the AI will see no reason to use militas if you got 10 footman. They would be able to clear the expansion just fine. |
| 10-27-2011, 06:54 PM | #5 |
Well i'm even later but Zal pretty much sums it up. There isn't an easy way for you to access AMAI's militia code as its too intertwined with AMAI's internal bits and pieces. |
