AI Duke Out

AI Duke Out

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

Moderators: hoijui, Moderators

User avatar
munch
Posts: 311
Joined: 26 May 2005, 20:00

AI Duke Out

Post by munch » 18 Dec 2005, 00:13

Thought you boys might like to know the results of a few games I ran today whilst doing other stuff - I let the latest versions of NTAI and AAI, and the JCAI that ships with Spring 0.67b3 fight it out on Mars, both as ARM vs ARM vs ARM and same for CORE.... NTAI won hands down both times.

Interestingly though AAI is pretty good, it fails to build anything at all if it starts in the bottom left start position on that map - might need looking into!

I tried to upload a replay so you could watch the action, but FU wasn't playing ball =(

Thanks for taking the time to develop these AIs guys =)

Cheers

Munch
0 x

CrowJuice
Posts: 88
Joined: 13 May 2005, 11:01

Post by CrowJuice » 18 Dec 2005, 11:49

You forgot OTAI :wink:
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 15:42

You dont get any errors detailing out of virtual memory at all with NTAI? They're driving me mad, and they're happening in the middle of functions that ahvent changed since 0.25 even tho the problems started with 0.28 (and around the tiem I upgraded versions of spring too hmmm.....).

Currently my games with NTAI v NTAI v AAI v AAI (0.29.05 and 0.32 respectively), go well, NTAI expands quickly but the game runs into the memory problem aroudnt he 11 minute mark every single time, and amsse gets it too, btu his seems mroe around either 11 mintues or 32 min marks.

So far nobody but him and me has complained about this even tho I get these problems in 0.28.10+........
0 x

User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen » 18 Dec 2005, 16:06

Maybe you are releasing too many updates, people get download-tired that way.
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 16:13

Yah but eitherway I am having trouble fidning this bug.

According to the logs the error happens midway through writting to the log, usually I see the gametime, followed byt eh end of the file, or half a tag written out, which makes no sense and points tot eh error being in:

Code: Select all

if (logFile){
	fputs(gtime.c_str(), logFile);
}
I've tried commenting out the AAI attack code I ported over and edited, the stockpiling routine, I've gotten rid of big masses of attack group handling ode and re-implemented it , I've added lots and lots of checks just to make sure things are working as they should and no problems are occuring, I turned off all the debugging options by default so blobs and the mouse thgins dotn show uelss you type ".mouse" and ".lines", I've commented the D-gunnign and stoickpiling of missiles, and the firing of stockpiled missiles, I've commented out high trajectory and changing mvoe state, and i still get the same results.

The only thign elft it could have been was cains metal class, which I recently tore out and replaced with krogothes mex class , and tho there was idneed an improvement in gameplay, the error still occurs and it is gettign very annoying.

What's mroe annoying si that it only seems to be happening to me ro masse, and I know not of any of the hundred or mroe people who downloaded those versions complaining once about it happening.......

Image
Eitherway I wont eb releasing 0.29 for a while at least till I've overhauled scouting and sorted this mystery out.
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 17:17

hmmm
Masse has just playtested again and he mentioned that he's been playtesting different situations on AAI 0.32 and has gottent he same virtual memory too low crash I get on NTAI only games, even thot he game was just 4 AAI's in a ffa with no NTAI present.

Thus I have been searching for an AI bug when ti is an engine bug, and a nasty one at that.

AAI 0.32 wont build on comet catcher if it starts in the top east corner, it builds a soalr, waits ages then builds a second then does nought. It also builds too little resources inbetween its first and second factories and ends up stalling towards the end of the second factory.
0 x

berzehk
Posts: 12
Joined: 28 Apr 2005, 18:52

Post by berzehk » 18 Dec 2005, 17:29

BTW, i tried to use bots, but except JCAI, none was working.
Their commanders usually stay without doing nothing.
The game also makes error boxes saying that NTAI, OTAI and AAI are wrong ai dlls.
is there a solution for that? i haven't found any in the forum :(
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 17:36

yes it's called using the latest version of spring. Iif you're not using V 0.66 or later then they'll give errors. Either that or you're usign an old version of NTAI/AAI such as NTAI 0.20b2
0 x

User avatar
sintri
Posts: 55
Joined: 30 Nov 2005, 18:38

Post by sintri » 18 Dec 2005, 19:07

new releases are good if your current release is a pain in the ass. But yea, the same thing happened for me on Comet Catchers with AAI 0.32. Though AAI haven't sucked up my memory during play yet. I've complained about it, or least I think I have, but either case, I'm complaining now :) cept for mine sometimes just locks up, need to switch my OS back onto the fast harddrive.
0 x

jellyman
Posts: 265
Joined: 13 Nov 2005, 07:36

Post by jellyman » 18 Dec 2005, 21:39

I always get a crash on NTAI after a while. Once I got a virtual memory error message.
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 21:43

And you're not sending em descriptions or AILogs at all?!!?!?!?!?!?!?!? Are there hudnreds fo suffering people out there who refuse to give data that could fix the problem?

I take it the majority fot hese crashes are VM is low emssages and their associated freezes.

Suffice to say the new copy of NTAI now runs on my machien 40 mins+, and I ahve a new set of bugs that i exchanged for the VM low bug, but these are fixable!
0 x

Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic » 18 Dec 2005, 22:24

i could send u mine alantai but 131 Mb its not very good for sending i guess...
too much logging ?
(i can guarantee u that i havent played that much with it, i only do it to see how the ai's are going ocasionally)
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 18 Dec 2005, 22:31

Well delete it and redo, That'll be all the logfiles of ll the games you've played amassed. While that'd be okay if it was something like 0.28.10, if you've kept logs from as far back as 0.20b2 then I'm not surprised it's so huge.
0 x

User avatar
sintri
Posts: 55
Joined: 30 Nov 2005, 18:38

Post by sintri » 18 Dec 2005, 22:39

lol, I've pretty much deleted all the logs your ai generates, so... heh?
0 x

b1ind
Posts: 48
Joined: 21 Apr 2005, 04:01

Post by b1ind » 19 Dec 2005, 06:43

I've read that NTAI makes some immense logfiles.. perhaps the virtual memory overrun is tied to the size of the log file. The reason that that came to mind is because you said that it happened partway through writing. Anyway, give that a look. If not... oh well.
0 x

jellyman
Posts: 265
Joined: 13 Nov 2005, 07:36

Post by jellyman » 19 Dec 2005, 07:44

I never sent log files because I didn't know about them. My definition of advanced user is someone who posts threads with titles more helpfull than 'help me plz it broke'. Now I know they are wanted, and I've found where its saved so I will send one next time I have a chance.
0 x

User avatar
munch
Posts: 311
Joined: 26 May 2005, 20:00

OTAI

Post by munch » 19 Dec 2005, 14:42

CrowJuice wrote:You forgot OTAI :wink:
Sort of. It was surprisingly hard to get the other three AIs to play against each other, even though I'd succesfully played games against each of them (albiet a lot of the games I started crashed before the end). OTAI on the otherhand wouldn't even start a game with me, so I didn't get as far as trying to incorporate that in the test - sorry. I might give it a go at some other point.

Whilst I'm here, does anybody know how to start a game without any human players? The way I got the game working was to start with me as player/team 0 and have the AIs as teams 1-3. I then self-D as soon as the game started to become a spec. Any change in that configuration seems to cause problems. This is a shame as it means that if for example I did want to add OTAI, I couldn't set it up with one AI in each corner of the map (which is the obvious thing to do).

Munch
0 x

Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic » 19 Dec 2005, 18:27

just for the record ive had that nice memory error too!
its "crashed my pc" eating memory till windows come's to me with a low virtual memory and the game crashes out with a no memory error.
Is that an engine bug ? ai bug ?
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 19 Dec 2005, 18:55

It isnt the logging, loggign was in NTAI before the error cropped up, NTAI's log files ahve reduced in size drastically and it logs in plaintext now, and thatd dint fix the bug, I looked at the cosntruction code and changed everythign so ti didnt use pointers to unti objects btu refrences. This made the error go away, ro become none existant in most cases, btu ti broke the con code at the same time by generating exceptions, I'm just fixing those new bugs now.
0 x

User avatar
AF
AI Developer
Posts: 20667
Joined: 14 Sep 2004, 11:32

Post by AF » 19 Dec 2005, 19:16

Code: Select all

[GAME]
{
   Mapname=CometCatcher.smf;
   StartMetal=1000;
   StartEnergy=1000;
   MaxUnits=1000;
   StartPosType=0;
   GameMode=0;
   GameType=xta_se_v066.sdz;

   hostip=localhost;
   hostport=8452;

   MyPlayerNum=0;

   NumPlayers=1;
   NumTeams=4;
   NumAllyTeams=4;

   [PLAYER0]
   {
      name=yourname;
      team=0;
   }
   [TEAM0]
   {
      TeamLeader=0;
      AllyTeam=0;
      Color=0;
      Side=Core;
      Handicap=0;
      AIDLL=aidll\globalai\NTAI.dll;
   }
   [TEAM1]
   {
      TeamLeader=0;
      AllyTeam=3;
      Color=3;
      Side=Core;
      Handicap=0;
      AIDLL=aidll\globalai\AAI.dll;
   }
   [TEAM2]
   {
      TeamLeader=0;
      AllyTeam=2;
      Color=1;
      Side=Core;
      Handicap=0;
      AIDLL=aidll\globalai\NTAI.dll;
   }
   [TEAM3]
   {
      TeamLeader=0;
      AllyTeam=1;
      Color=2;
      Side=Core;
      Handicap=0;
      AIDLL=aidll\globalai\AAI.dll;
   }
   [ALLYTEAM0]
   {
      NumAllies=0;
   }
   [ALLYTEAM1]
   {
      NumAllies=0;
   }
   [ALLYTEAM2]
   {
      NumAllies=0;
   }
   [ALLYTEAM3]
   {
      NumAllies=0;
   }
   NumRestrictions=0;
   [RESTRICT]
   {
   }
The above script will run an AAI vs AAI vs NTAI vs NTAI on comet catcher XTA, with NTAI in the south and AAi in the north.

You start out in the bottom left corner, but you're sharing your commander with one fo the NTAI's, just do .cheat .spectator and watch what happens.
0 x

Post Reply

Return to “AI”