Skirmish AI: E323AI 3.22.4 - Page 11

Skirmish AI: E323AI 3.22.4

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

Moderators: hoijui, Moderators

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: A new artificial intelligent opponent - E323AI

Post by 1v0ry_k1ng »

raiders probably dont need to refresh their orders so frequently/have them calculated so often
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Well, every logical frame mod 8 a unit or group is selected and its path recalculated. So when there are many units this happens less frequently then when there is just one unit:

Code: Select all

 /* Rotate through the different update events to distribute computations */
switch(frame % 8) {

...
 
case 1: { /* update threatmap */
  CScopedTimer t(std::string("threatmap"));
  ai->threatmap->update(frame);
}
break;
 
case 2: { /* update the path itself of a group <------------------- */ 
  CScopedTimer t(std::string("pf-grouppath"));
  ai->pathfinder->updatePaths();
}
break;
 
case 3: { /* update the groups following a path */
  CScopedTimer t(std::string("pf-followers"));
  ai->pathfinder->updateFollowers();
}
break;

...
 
default: return;
}
But, I could probably lower the resolution, resulting in faster pathing. I'll experiment with it a little.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

:) why, its obvious - AI is just stuck in micro :) And then ragequits upon understanding that he cant do all perfectly. Realistic...
Couple of games, one good, other crashed. Fail behavior when its base gets scout-raided.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

I can't, just can't be silent.
Error323, you must be thinking "Hey, there are so many AIs in development, why would I go on with my one? Its so hard, some weird bug is making me crash, not fun to debug..." etc etc.
Your AI grabbed my attention because it was released so fast, and is already in such a good state! And the other projects - really, we have them every 2 month for the last 2-3 years, and they just don't make it anywhere. KAI was already old when I arrived, and RAI existed already. There were couple more, but they slowly became unmaintained and went out of existence.
So please, make an effort, fix whatever remaining bugs you might have and release it already :) AIs are important, many people play vs them or use them for testing.
Try to get community help if you think that something is dis-motivating you.

Here, I said.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

UPDATE v2.13.2 Sun Oct 4 19:07:07 CEST 2009
Changelog:
  • Less memory usage
  • Much better performance
E323AI SO/DLL: E323AI-v2.13.2-Ultralisk
E323AI SRC: E323AI@github

Though developmentspeed has decreased a little, it has not stopped! The main reason for the decrease is my studies. Anyway, this update should help a lot ! Have fun!
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: A new artificial intelligent opponent - E323AI

Post by 1v0ry_k1ng »

woop, testing

defence placement coming soon?
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Hey IK,

Well first I need to create it so that it has atleast 95% stability. And then it should probably cache the pathing. I need lots of test games and feedback from you guys on stability.
mcgoo
Posts: 33
Joined: 09 May 2008, 07:31

Re: A new artificial intelligent opponent - E323AI

Post by mcgoo »

massive performance improvement for me in the latest version. first time playing does not feel laggy, and first time i played until the end of the game without a crash :D.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

Woooohooooo!

Performance - running on a fast machine i have a stable 60 fps, and a laggy feeling disappeared - so nice job there!!!

Crashes - crashes much later in game, and gives some useful info in infolog (stacktrace etc).

DIS IS SO COOL

P.S. The last lines from infolog (BA 7.01, Darkside Remake vs KAIK)

[ 12679] Stacktrace:
[ 12679] (0) E:\games\Spring\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll [0x68D963C7]
[ 12679] (1) E:\games\Spring\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll [0x68DA359C]
[ 12679] (2) E:\games\Spring\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll [0x68DC4C6D]
[ 12679] (3) E:\games\Spring\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll [0x68DA8E00]
[ 12679] (4) E:\games\Spring\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll(handleEvent+0x96) [0x68DA0E17]
[ 12679] (5) E:\games\Spring\spring.exe [0x008440E6]
[ 12679] (6) E:\games\Spring\spring.exe(skirmishAiCallback_Unit_CurrentCommand_getTag+0xbbca) [0x0086179A]
[ 12679] (7) E:\games\Spring\spring.exe [0x00872049]
[ 12679] (8) E:\games\Spring\spring.exe(skirmishAiCallback_Unit_CurrentCommand_getTag+0xf798) [0x00865368]
[ 12679] (9) E:\games\Spring\spring.exe [0x00406A68]
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A new artificial intelligent opponent - E323AI

Post by hoijui »

Had my first longer game against your AI, really cool :D

Next thing i am goign to try is combine it with a KAIK. KAIK for the heavy attacks, your AI for the ugly micro attacks.. has to be hard! :D

It crashed after soem time, i attached the demo and the infolgog (don┬┤t know if the demo helps anything, but was only 1.3MB.
i played with current spring master (commit: 53410e3a94381d366e2583278e049ca46aa9fb4d)

What i noticed.. it got really slow again, while hte game progessed :/
In the beginning, it works nice now, but.. i have unit limit at 500, and it was a really small map (Brazillian Battlefield), but it constantly used about as much CPU as DrawWorld (~30%) in shortly before it crashed.
Attachments
local_20091005_102547_unnamed_0.80+.0.sdf
demo
(1.36 MiB) Downloaded 20 times
infolog.txt
(34.33 KiB) Downloaded 25 times
User avatar
FaerieWithBoots
Posts: 149
Joined: 17 Jun 2009, 13:21

Re: A new artificial intelligent opponent - E323AI

Post by FaerieWithBoots »

I did a couple of test games on avalanche today. 2 Error323 AI vs 2 KAIK using BA
No crashes! and good frame rates (60-120).

Tried the same with XTA9.59, but that crashed on startup. Could very well be KAIK causing the crash. I remember kaik had some problems with this version of XTA.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A new artificial intelligent opponent - E323AI

Post by hoijui »

Faerie, you could look at the end of infolog.txt. usually there is a stack trace there after a crash, and if so, and it crashed because of an AI, then it would contain some reference to the malicious AI.

@Error323
i may have found/fixed the crash bug of the last two infologs, (which is the same i had with the older versions of your AI). sorry, i forgot that you can not use stack traces anyway, so i ran in gdb and looked at the code again. You may remember that the problem was at CTaskHandler.cpp:225. i though it may crash cause the activeTasks map is altered while iterating over it, as it updates tasks, which probably adds new tasks to the map (or removes some), and therefore renders the iterator invalid.
so i copied the whole map and then ran the update loop on the copy of that map. it then took much longer till it crashed (usually crashed very early when running in GDB), and when it crashed, it was in an other location, so the fix might have worked.

The new crash is a SIGSEGV in the same file, in CTaskHandler:AttackTask::reset(), the third line, reading "enemy = ...". Looks like the returned UnitDef* is NULL to me, maybe an invalid unitId? (unit already dead, or you not allowed to fetch the unit def?)

edit: removed most ugly typos
Last edited by hoijui on 06 Oct 2009, 08:25, edited 1 time in total.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Cool guys, thats good news :D

Hoijui, thnx for ur feedback, I'll see what I can do about it this weekend.
User avatar
FaerieWithBoots
Posts: 149
Joined: 17 Jun 2009, 13:21

Re: A new artificial intelligent opponent - E323AI

Post by FaerieWithBoots »

tried E332ai with XTA9.59. It didnt work, spring crashed on startup.
"spring:unhandeled exception" But that doesnt tell yiu anything, right? XD.

The stacktrace might. Here it is:

[ 0] Stacktrace:
[ 0] (0) C:\Games\Spring79_1_2\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll [0x68D9F069]
[ 0] (1) C:\Games\Spring79_1_2\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll(release+0xd13) [0x68DA1E49]
[ 0] (2) C:\Games\Spring79_1_2\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll(release+0x23ffd) [0x68DC5133]
[ 0] (3) C:\Games\Spring79_1_2\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll(release+0x7cca) [0x68DA8E00]
[ 0] (4) C:\Games\Spring79_1_2\AI\Skirmish\E323AI\2.13.2\SkirmishAI.dll(handleEvent+0x96) [0x68DA0E17]
[ 0] (5) C:\Games\Spring79_1_2\spring.exe [0x008440E6]
[ 0] (6) C:\Games\Spring79_1_2\spring.exe(skirmishAiCallback_Unit_CurrentCommand_getTag+0xbbca) [0x0086179A]
[ 0] (7) C:\Games\Spring79_1_2\spring.exe(aiInterfaceCallback_DataDirs_getWriteableDir+0xd6f) [0x00871DEF]
[ 0] (8) C:\Games\Spring79_1_2\spring.exe(skirmishAiCallback_Unit_CurrentCommand_getTag+0xf0ac) [0x00864C7C]
[ 0] (9) C:\Games\Spring79_1_2\spring.exe [0x0073777B]
[ 0] (10) C:\Games\Spring79_1_2\spring.exe [0x0073D3B1]
[ 0] (11) C:\Games\Spring79_1_2\spring.exe [0x0073E152]
[ 0] (12) C:\Games\Spring79_1_2\spring.exe [0x00480899]
[ 0] (13) C:\Games\Spring79_1_2\spring.exe [0x00403A87]
[ 0] (14) C:\Games\Spring79_1_2\spring.exe [0x0042192F]
[ 0] (15) C:\Games\Spring79_1_2\spring.exe [0x00423C3C]
[ 0] (16) C:\Games\Spring79_1_2\spring.exe [0x007EF55A]
[ 0] (17) C:\Games\Spring79_1_2\spring.exe [0x007F6437]
[ 0] (18) C:\Games\Spring79_1_2\spring.exe [0x007EE3CB]
[ 0] (19) C:\Games\Spring79_1_2\spring.exe [0x007EE871]
[ 0] (20) C:\Games\Spring79_1_2\spring.exe(aiInterfaceCallback_DataDirs_getWriteableDir+0x35c8) [0x00874648]
[ 0] (21) C:\Games\Spring79_1_2\spring.exe [0x0040124B]
[ 0] (22) C:\Games\Spring79_1_2\spring.exe [0x004012B8]
[ 0] (23) C:\Windows\syswow64\kernel32.dll(BaseThreadInitThunk+0xe) [0x7692E4A5]
[ 0] (24) C:\Windows\SysWOW64\ntdll.dll(RtlCreateUserProcess+0x8c) [0x7793CFED]
[ 0] (25) C:\Windows\SysWOW64\ntdll.dll(RtlCreateProcessParameters+0x4e) [0x7793D1FF]


Hope it helps you find the problem. (fortunatly it still works with BA :) )
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: A new artificial intelligent opponent - E323AI

Post by bartvbl »

this might be happening due to your version of spring. I believe there were some new features and bugfixes on the field of AI in version 0.8. Installing that might help :)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A new artificial intelligent opponent - E323AI

Post by hoijui »

bartvbl is right.
Also, always include the whole infolog, and attach it as a file (do not paste into the message).
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: A new artificial intelligent opponent - E323AI

Post by DJ »

does this only occur in XTA and not BA? I've not looked at the code but just check that the configs and various directories match those for BA.
User avatar
FaerieWithBoots
Posts: 149
Joined: 17 Jun 2009, 13:21

Re: A new artificial intelligent opponent - E323AI

Post by FaerieWithBoots »

Yes, this only happens in XTA. Ba works fine.
Just to be sure, i redownloaden the latest Spring.exe (0.80.4.2), same result.

The complete infolog is attached this time, i wont paste them anymore :roll:
Attachments
infolog.txt
(20.87 KiB) Downloaded 18 times
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: A new artificial intelligent opponent - E323AI

Post by 1v0ry_k1ng »

new version coming soon ?
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Well time is not on my side these days. Can't say when a new version will be comming out. But development hasn't stopped! There is a very latest version in git though, but its not release-worthy yet.
Post Reply

Return to “AI”