Testing AAI
Moderators: hoijui, Moderators
You can pick a bunch points on the heightmap and pathfind between them, so you can see if they are reachable by land or by see... With that you can globally determine which landmass is connected to which other landmass, and if your startpos connects to more than 5 landmasses or something, you will build some non-sea defense as well.
great progress you are making there. keep it up, your AI is real nice to play against already make it even more evil and strong!
a question: does the AI build mexxes outside its boundaries of base yet? ever seen the AI do that. sometimes also it wont do anything in the start (upper left corner of comet catcher , core prime metal map) or just one solar and then nothing else. sharing units with your AI is also a fun way to play , you provide the basemanagement and the AI attacks and scouts for you .
a question: does the AI build mexxes outside its boundaries of base yet? ever seen the AI do that. sometimes also it wont do anything in the start (upper left corner of comet catcher , core prime metal map) or just one solar and then nothing else. sharing units with your AI is also a fun way to play , you provide the basemanagement and the AI attacks and scouts for you .
You'd need to impliment a threat map. So that the builders know where it is safe enough to travel to alone. By the same token, it can be used to know where to attack with more or less troops.submarine wrote:aai does build mexes outside its base within a certain range. yet it doesnt build mexes if they are too far away. i'll probably change that in the future but at the moment it would probably cause the ai to get its builders getting killed while sending them all around the map
So did NTAI and OTAI, and the simple solution was to scout. Or to add a threshold level, for example in NTAI the threat level would keep getting smaller and smaller as in AAI btu enver reach zero, so I made it check if ti was below 10 and if it was then it'd ignore it, thus the units became idle and no more re-inforcements where sent.
Since submarine has not released any source code at all save for the very first release, I cant comment on wether he's added this improvement yet.
Since submarine has not released any source code at all save for the very first release, I cant comment on wether he's added this improvement yet.
maybe split the main force to the 3 biggest threat locations? in most battles the largest threat is not the only threat and then the units have to wander across the whole map to get there or they just stay at that place and keep resuplying that location until there are too many units. it should send armies around scouting too if it has too many units. the normal scouts dont discover much they die way too fast.
I dont really know if i have the latest version of aai, but i get this error quite often
Code: Select all
ERROR: UpdateSectorThreat() invalid UnitDef of attacker 4683
I have been screaming about engine inconsistencies for ages. But by now every single major skirmish AI ahs a check for these thgins at as many function calls as possible. Just look at NTAI 0.28 source, at the sheer nubmer of validity checks it makes on unit ID's and untidefinitions.
The vast majority of bugs in our skirmish AI's over the last few months have been caused by the AI tryignt oa ccess the untiDefinition fo an invalid unti ID or handling invalid data passed on by the engine. It's a symptom of the chronic mess the core of spring ahs become, and should be fixed when jouninkomiko is finished rewritting the core and the GUI code.
The vast majority of bugs in our skirmish AI's over the last few months have been caused by the AI tryignt oa ccess the untiDefinition fo an invalid unti ID or handling invalid data passed on by the engine. It's a symptom of the chronic mess the core of spring ahs become, and should be fixed when jouninkomiko is finished rewritting the core and the GUI code.
I haven't had alll that many validity checks to do on data directly from the Engine, just that one where UnitDestroyed gives a unit of -1 for the attack (can't see it or doesn't exist). Most of mine are for those UnitInfo arrays I keep on all the units in the game, so my AI can know what units the enemy has, even if it can't see them.
BTW, OTAI doesn't use a threat map. It probabaly should, but it doesn't, just yet. It picks targets for the attack teams based on individual enemy units, whatever's closest.
BTW, OTAI doesn't use a threat map. It probabaly should, but it doesn't, just yet. It picks targets for the attack teams based on individual enemy units, whatever's closest.
AAI is not alone, it happens under all skirmish AI's its just we handle ti differently. AAI handles it by outputting an error emssage and apending the invalid unitID on the end as shown above.
These sorts of prblems arent the biggest problem though, it's things sucha s sometimes the engien crashes when we try to do a command soemtimes, or the fact we cant do thgins the player can, such as use repeat orders ro change trajectory/firing state/move state or tell if a corpse can be resurrected or not.
Next version of NTAI will come in two versions because of this, one with the unit idle behaviours and one without.
These sorts of prblems arent the biggest problem though, it's things sucha s sometimes the engien crashes when we try to do a command soemtimes, or the fact we cant do thgins the player can, such as use repeat orders ro change trajectory/firing state/move state or tell if a corpse can be resurrected or not.
Next version of NTAI will come in two versions because of this, one with the unit idle behaviours and one without.