java AI strange behavior online

java AI strange behavior online

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

Moderators: hoijui, Moderators

Post Reply
Bla
Posts: 79
Joined: 25 Feb 2013, 14:44

java AI strange behavior online

Post by Bla »

When my AI plays in single player, it plays fine, and frequently beats KAIK and E323 AI. However, on multiplayer, it does weird, unexplainable things. It only works in multiplayer on sandbox mode with no other human players.It seems to work fine alone or vs other AI.

Some examples of my AI's strange behavior are that when my AI is in an online game, it frequently doesn't know where the mex spots are, but in single player, it has no problem. To get the mex spots, my AI uses

Code: Select all

Resource metal= CallbackHelper.getCallback().getResourceByName("Metal");
LinkedList<AIFloat3> availableMetalExtractors = ooaicallback.getMap().getResourceMapSpotsPositions(metal);
Does that not execute properly when it is on an internet game? Maybe information hiding or something to prevent people from cheating?

Also, I noticed that it looks like it probably thinks the team eco is its own. I would be teamed up with it and have full storage, while it is stalling, and it will play like it has full storage. I've tried the same situation both in singleplayer and multiplayer. In singleplayer, it knows its economy just fine, and acts independently of mine. In multiplayer, it seems to mistake the team economy for its own. This leads me to believe it has the wrong teamID, but that doesn't explain why it works just fine in 4 way bot FFAs in single player.

Also a thing to note, when I started this AI a year ago, rather than getting the .jars then putting them into a /jlib file, I foolishly decompiled all the jars, then recompiled them into my AI, to make one big jar, because I wasn't aware of the problems with doing that. But I hear that the java interface isn't maintained anymore, so I don't think my decompiled jars are out of date.

Are these known problems with the java interface? Or is it my AI? Seems very unlikely that an error in my coding will cause the AI to play fine in single player, but totally fail in online play.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: java AI strange behavior online

Post by lamer »

I don't use Java ai and never noticed such behavior in C++ ai. Some hints:
Log suspicious calls/ouput in singleplayer and multiplayer, compare results.
Probably related Java AI Interface broken?
Post Reply

Return to “AI”