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);
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.