AAI 0.60 released (win + linux version included) - Page 3

AAI 0.60 released (win + linux version included)

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Baloogan
Posts: 23
Joined: 15 Jan 2006, 17:52

Post by Baloogan »

I think that this is the best AI for TASpring. :D
User avatar
Imperator
Posts: 85
Joined: 13 Oct 2005, 00:04

Post by Imperator »

also noticed a crash when taking over units with the commander. maybe a simple auto-self-destruct-on-being-taken-over routine will fix this ;).
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Imperator wrote:also noticed a crash when taking over units with the commander. maybe a simple auto-self-destruct-on-being-taken-over routine will fix this ;).
i mentioned it in the readme:
"- Game crashes when ai units get captured"
User avatar
Imperator
Posts: 85
Joined: 13 Oct 2005, 00:04

Post by Imperator »

oh sorry for that :)
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

I just noticed something.

When testing on the same map, I think I noticed a correlation between how long the game took to crash and how high the unit limit was (it's still much more stable than 0.55 though, nice job :-)) - is there any chance that the AI is getting confused when it's not allowed to build more units?

I know it's pretty obvious so I'm probably wrong, but then maybe you always test at limits of 5000 (which AFAIK are never reached) and haven't noticed the bug.
Either way, this AI kicks ass and has now given me several huge battles of long duration without crashing. 8)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

technically the onyl way fo knowing if a unti is being captured if your an AI is to wait for the capturing to finish, there's no GetEnemyCommands() or isUnitBeingCaptured() callback function atm...
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I just tested the .so and it actually works! great work! Hopefully more AI devs will release linux binaries now :P

I haven't tested with gcc versions lower then 4.0 yet, but you might want to put the gcc version and #of bits (ie. 32 or 64) in the name of the so. That because a 32 bit .so won't work on 64 bit compiled spring and vice versa. (but maybe nicke already told you this)

anyway, it works, but it crashed after a while (just after finishing a mex on SmallDivide), here's a backtrace (which points out the obvious advantage of including the symbols with the .so :-) ):

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1456001984 (LWP 14267)]
0x59bce93f in AAIExecute::FindExternalMetalSpot () from aidll/globalai/aai.so
(gdb) bt
#0  0x59bce93f in AAIExecute::FindExternalMetalSpot () from aidll/globalai/aai.so
#1  0x59bcf3cb in AAIExecute::BuildExtractor () from aidll/globalai/aai.so
#2  0x59bd0c05 in AAIExecute::CheckConstruction () from aidll/globalai/aai.so
#3  0x59bd6a4f in AAI::Update () from aidll/globalai/aai.so
#4  0x080510ef in CGlobalAIHandler::Update (this=0x8e67510) at rts/ExternalAI/GlobalAIHandler.cpp:61
#5  0x081213a7 in CGame::SimFrame (this=0x86f4448) at rts/Game/Game.cpp:1254
#6  0x0812d4ed in CGame::ClientReadNet (this=0x86f4448) at rts/Game/Game.cpp:1677
#7  0x0812e46f in CGame::Update (this=0x86f4448) at rts/Game/Game.cpp:947
#8  0x0827966e in SpringApp::Draw (this=0xffffd160) at rts/System/Main.cpp:569
#9  0x0827b5ef in SpringApp::Run (this=0xffffd160, argc=1, argv=0xffffd224) at rts/System/Main.cpp:734
#10 0x0827b826 in main (argc=152623476, argv=0x918d974, envp=0xffffd22c) at rts/System/Main.cpp:813
E: oh, this was running mod xtape.sd7, which actually is a renamed XTAPEV5.sd7
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Soulless1 wrote:I just noticed something.
is there any chance that the AI is getting confused when it's not allowed to build more units?
according to nicke it has to do with the cpu load - some multithreading issues i didnt even know about may cause the game to crash. i changed that and it seems as if my test version runs much more stable than aai 0.6

but dont ask me for further details, i dont know much about threading. im currently adding some minor things as well as aata support, i think there'll be a minor update sometimes the next week

@af:
i agree with you, a UnitBeingCaptured() callback function would be nice, iirc you wanted to take care of the ai interface. perhaps you could add this and we'll have a minor update of the current ai interface before designing a completly new one
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'm going to work on the groupAI callback instead and get NTai working under it, then add another thign I've been designing to seperate GroupAI and Global AI while keeping them in the same interface.... That way we then ahve 2 itnerfaces liek we currently do, one unified interface for groupAI + new globalAI and the old GlobalAI interface.

That and I'll release an AI udner the new setup that has the old setup inside it like a bridge between the two, and you can keep on using the current itnerface while adding bits fromt he new as you wish, or use half half transfering the AI or just the parts that'd use it.....
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

edit:

i fixed two more bugs and aai now supports mods with buildings as starting units
Targon
Posts: 99
Joined: 16 Dec 2005, 05:15

Post by Targon »

so there is

LAND_WATER_MAP - map contains both water and land (with direct land connections to the other bases)

and

WATER_MAP - pure water map (AAI will not build any ground assault units)

on maps like shore 2 shore and divided shores it calls it a land_water map despite the fact that the two AAI's on the map cannot reach each other with land units. Switching it to water_map means that they seem to only build ships and not planes or hovers.

Could you add another setting where it builds air and hovers in addition to water so that it would work better on island maps with neither the land-unit buildup on the shore (Land_water) nor with the lack of air support (water_map)?
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

yes on some maps you have to switch the maptype manually - but remember deleting the map learn file afterwards (otherwise the changes wont take effect)

aai should build hovers and aircraft on all map types. but it remebers how efficiently it could use them in batlle, so if dozens of hover crafts get shreddered by a few ships it will more focus on building ships the next few matches

switching from land_water:map to water_map only prevents aai from building ground units
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

I get the feeling perhaps that a UnitCaptureAlert() would be even better, because it would let the AI doing the capturing send an alert when it completes capturing, that would mean you wouldn't waste cycles in another AI checking to see which if any of hundreds of units have been captured.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

That might be a good idea triaxx but it isnt the be all end all

You would still have to check the units are still being captured and that the capturer hasnt stopped/been destroyed/ capture target moved out of capturers range...
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

Wouldn't matter, the capture alert wouldn't be issued until the capture was completed, and it would override any further commands. The unit being captured, would still recieve orders, and attempt to carry them out, the unit doing the capturing would simply be destroyed, and wouldn't complete it. If it moves out of range the capturer should pursue.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

In that case *points at the unit change team and unit captured events in the HandleEvent routine*
User avatar
unpossible
Posts: 871
Joined: 10 May 2005, 19:24

Post by unpossible »

Sub, could you dynamically vary the 'max builders per type'?

Instead of starting off with a fixed number which all of the factories build of each type of builder before they start churning out units, could you start off with a much lower initial number (1?) and then work out how many builders there should be as the game goes on, gradually growing the building force.

It might help the ai start off a little bit quicker on the smaller maps, or when it builds an AA vehicle factory or adv kbot lab in XTA...skipping building 3 or 4 of every possible type of builder before committing to a fighting force.

Not sure exactly how to do this... perhaps relate it to the number of factories in total (as a ridiculously simple example)?

You could keep that new MAX BUILDER PER TYPE number for the AI, which it would then go about maintaining - priority replacement etc. The end game might be more fun after they start spewing out insta-bulldogs with the 20 fark builder army.
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

AF:Hmmm, I'll investigate that section of code.

up:Sounds like it needs a min, as well as max. Start building at the first plant, and then crank up to the max.
User avatar
unpossible
Posts: 871
Joined: 10 May 2005, 19:24

Post by unpossible »

Maybe the max limit could be pretty soft, i mean let the ai decide the limit based on available resource (STRUCTURES/BUILDINGS!). Or maybe detect the 'good' builders like farks and produce more to boost manufacture speeds.

The minimum 'limit' (or just the one) is the key for sure. After that the 'max' needs to be a dynamic target, based on available resources.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

unpossible wrote:Maybe the max limit could be pretty soft, i mean let the ai decide the limit based on available resource (STRUCTURES/BUILDINGS!). Or maybe detect the 'good' builders like farks and produce more to boost manufacture speeds.
aai does already rate builders atm. i've often seen games wheer it built 4 or 5 cons. kbots but only 2 beavers (in aa). but apart from that i absolutely agree with you. i just have to find out a good way to determine the game state (independend from the mod)


right now im working mainly on fixing bugs. the coming aai version should be much more stable and there have been plenty (~10) of other bugs fixed (which didnt crash the game but cause odd behaviour)
Post Reply

Return to “AI”