Skirmish AI: E323AI 3.22.4 - Page 6

Skirmish AI: E323AI 3.22.4

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

Moderators: hoijui, Moderators

Post Reply
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

Here is my config file for BA :) Couple of hundreds changes :) I only changed obvious things, so its in no way tuned or optimized, but rather a base for future tuning.

In comment to every unit i added a line regarding what i changed - the line is always in "(!!! ...)" format so you can remove them by simple regexp if you wish.

Some notes: tested with 80.4 and BA 7.0 on SmallDivide, TitanDuel and crossing4final using my config


Notes in order of importance:

1. Lag spikes (and I'm using quite good computer atm) every time when it has to choose new unit to be built from lab. Since the selection is so limited i suspect a bug. Lag spikes are too big to be ignored or tolerated.

2. Crashes after about 20 minutes ingame - intuition tells me its connected to the 1 above.

3. Weird, I already saw it perform better, but now again it builds only fleas for arm and ak/crasher for core, BAD! (My config didnt change the t1 bots except for SCOUTER tags)

4. Enemy builds one cloaked mex - E323AI keeps sending scouts next to it which just stand there with attack order, doing nothing (its cloaked), waiting for their death. Repeat. Hint - moving right next to cloaked stuff reveals it. Also - after the mex gets decloaked by accident and is killed (paralyzing scouts) - the game crashes.

So, those were the big deal, now less important:

5. Economy - oh how good it is, but it keeps building wind only on every map that has feasible wind - even on Titan which has 3-18, so its not good overall. It has to alternate between wind and solar (when? need to think...) and build advanced energy sources as well (advsolars)

6. Cmon, dont be lazy, implement a DONTBUILD tag.


I don't care if my config gets used or just discarded, i have no sentiments for computer files :) (but I see no reason why you wouldn't want to use it)

http://rapidshare.com/files/274162004/B ... 1.cfg.html

Can't wait for new version :)
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Hi, will you be looking into compatibility of mods such as CA, AA and NOTA later or is it BA/XTA-centric AI? Other than that I will be very glad to try it out, when it gets more stable.
Sorry, not in the nearby future by me. But as it progresses it might perform better on those mods by `accident'.

a) how does the AI compose it's land army under BA? Does it produce useless AA land units who can't hit ground units when enemy has no air units, or does it switch to build some AA units when that happens?
It doesnt detect air units yet. What it does do is using the config file and enemy units to construct a probability distribution (a pie chart) of enemy categorial units (ASSAULT,ANTIAIR,SCOUTER,...). Next it selects a random number giving the biggest part of the pie the highest probability of being built.
b) how are the air attacks of the AI? Do they accompany land/sea army or just pick random targets at random times? Or maybe there are too few air units and it needs a boost?

c) is AI aggressive at sea with hovercraft and ships? Does it get the balance right between AA ships, submarines and artillery ones?
Currently it focusses on ground only.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

AF wrote:You cannot claim you can beat all other AIs at XTA or any mod because your AI cheats, and other AIs do not cheat or do not cheat to the same extent.
Sorry you're right, I shouldn't. When the time comes I'll disable cheating and see if this holds.

Note however, it ONLY cheats on enemy location and type for the threatmap construction and raiding. This is what's called full observability in AI terms in contrast to partial observability.
Last edited by Error323 on 01 Sep 2009, 09:56, edited 2 times 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 »

As for E323AI and other mods: I tried to run it with my mod (tweaking the config by hand). It kind of works. As in AI builds 1 mex and stops. When I manually took over and ordered an energy structure and a factory built, it resumed operation (factory started producing units, con units went out to cap metal, etc.), but it never attempted to build any more base structures except storage and mexes, and all the mobile units built were of only 2 types - a combat unit (cheapest one at the factory) and a con unit, despite the factory having more unit types available. Of course AAI had beaten it under those conditions, even without cheating. I can provide the mod and config files if you like so you can see that for yourself.
This is definitly a config issue, mind you the config means everything to the AI. If its incorrect (and incorrect can be extremely subtle) it'll misbehave with great ramifications. Let me give you an example here:

I auto labelled the Fusion and GeoThermal with EMAKER. When the AI reached T2, it build a T2 worker after which energy levels were low. So the T2 worker, being idle, was given the abstract order "Build EMAKER" and selects the first item from its buildlist with the config value EMAKER, which was a GeoThermal. Now the entire AI locally collapses because it never starts building it (since it requires a specific location) and all surrounding T1 bots try to assist it, since the building wasn't begun yet and they calculated that they would be able to assist before it finished.
As none of my units are from OTA (BA, XTA, CA, etc.), this kind of proves that the AI can in theory play other mods, but it needs some more work.
Cool!
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Here is my config file for BA :) Couple of hundreds changes :) I only changed obvious things, so its in no way tuned or optimized, but rather a base for future tuning.
Sweet, thank you!!. I'll definitly use it! And merge it with mine (because of subtle issues described above).
In comment to every unit i added a line regarding what i changed - the line is always in "(!!! ...)" format so you can remove them by simple regexp if you wish.
You can use '#' for prefixing comments, I'll change it, all behind '#' and '#' itself won't be parsed.
1. Lag spikes (and I'm using quite good computer atm) every time when it has to choose new unit to be built from lab. Since the selection is so limited i suspect a bug. Lag spikes are too big to be ignored or tolerated.
I'll see if this still holds after I bugfixed and merged configfile.
2. Crashes after about 20 minutes ingame - intuition tells me its connected to the 1 above.
I'll see if this still holds after I bugfixed and merged configfile.
3. Weird, I already saw it perform better, but now again it builds only fleas for arm and ak/crasher for core, BAD! (My config didnt change the t1 bots except for SCOUTER tags)
I'll see if this still holds after I bugfixed and merged configfile.
4. Enemy builds one cloaked mex - E323AI keeps sending scouts next to it which just stand there with attack order, doing nothing (its cloaked), waiting for their death. Repeat. Hint - moving right next to cloaked stuff reveals it. Also - after the mex gets decloaked by accident and is killed (paralyzing scouts) - the game crashes.
Yeah, maked a note of it :)
5. Economy - oh how good it is, but it keeps building wind only on every map that has feasible wind - even on Titan which has 3-18, so its not good overall. It has to alternate between wind and solar (when? need to think...) and build advanced energy sources as well (advsolars)
Wind or solar is a pure mathematical calculation which assumes a uniform distribution over min and max windspeed:

Code: Select all

average wind = (minimal wind + maximal wind) / 2
wind profit  = average wind / wind cost
solar profit = average solar / solar cost

if (wind profit > solar profit)
   build wind as primary energy source
else
   build solar as primary energy source
Because of the storage buffers this is quite effective, except that it disregards time to walk to empty spot for building a wind/solar.
6. Cmon, dont be lazy, implement a DONTBUILD tag.
If you provide solely a LAND, SEA or AIR tag, the unit will be disregarded.
Can't wait for new version :)
Working on it :)
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: A new artificial intelligent opponent - E323AI

Post by yuritch »

Your example with a geo probably answers my question as to why the AI went passive after the first mex - my starting unit can build a geo power structure, and most probably it was attempting to do just that. Ok, I'll try to remove EMAKER tag from that building, let's see if that changes AI behaviour.
Also, does ASSISTER tag have a use on non-construction units? Autogenerated config had it on quite a few combat units as well, I removed those tags from there.

Edit: tried removing the EMAKER tag from geothermal power plant. The AI still idles after completing the first mex. Looks like something else is causing that.
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.10.2 Thu Sep 3 11:21:07 CEST 2009
Version 2.10.2 (Ultralisk) is out, changelog:
  • Extensive logger
  • Pathfinder bugfixes, no more idle attackers
  • Overall cleanups
E323AI SO/DLL: E323AI-Ultralisk-v2.10.2 (mirror)
E323AI SRC: E323AI@github

I compiled the windows dll with DEBUG symbols in order to fix the crashes. This means I will first need new crashlogs (pastebin) before I can fix that problem sorry.

Please also always check the log first before reporting, and include it both on fatal and non-fatal crashes).
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

Hi!

Tested with several games vs both me and other AIs. Spring 80.4, BA 7.01; Maps: darkside remake, altair, barren, crossing4final.

1) Crashes in almost all games, never later than 12 minutes. Crash reason - unclear, all logs end in different lines (so i suppose crash event is not logged). Have this gut feeling that it tends to crash when an enemy structure gets destroyed, but not sure.

2) On darkside remake seems to have problems - com idling all the time, not expanding etc. Log reports pathing failed for com. Didn't happen on other maps

3) Lag spikes, bad!

4) Read error log, its full of "failed to build ARTILLERY/SNIPER", tried to add ARTILLERY and SNIPER to t1 core bot units - to no avail, log is still full of those errors.

Go go go go! Can't wait to see those fixed! (I really suspect some simple bugs there).

I will have more comments later but those above just need fixing first.
Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Re: A new artificial intelligent opponent - E323AI

Post by Smiff »

sorry no chance to test yet.
he needs the logs! (crashes on windows)
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: A new artificial intelligent opponent - E323AI

Post by xyz »

got some crashes for you:
http://pastebin.com/m1b8afdbb
http://pastebin.com/m19379485
http://pastebin.com/m62e09172

The format of the log is:
AI log:
---------------------------------------------------------
the log generated by the AI

Spring log:
---------------------------------------------------------
content of infolog.txt

Also got a slowdown http://www.imagebam.com/image/f084c747748758 the game that usually stays at 70-90 fps went down to 1 fps with your AI.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Thanks guys! Working on it!
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.10.3 Thu Sep 5 17:47:07 CEST 2009
Version 2.10.3 (Ultralisk) is out, changelog:
  • Logging updates
  • Pathfinder border expansion
  • Forward declarations
  • No more crash in BA/XTA with right config (hopefully, please test)
E323AI SO/DLL: E323AI-Ultralisk-v2.10.3 (mirror)
E323AI SRC: E323AI@github

On errors, please post the infolog and last 100 lines of the log by the A.I.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: A new artificial intelligent opponent - E323AI

Post by Super Mario »

The AI seems to struggle when it comes to water maps, because the units keep getting stuck and having a hard time figuring out that there is land bridge between the two islands. The construction kbots should reclaim features when it's low on energy. The game also crash on me. Here is the info log.
Attachments
local_20090905_111521_unnamed_0.80.4.sdf
replay
(1.16 MiB) Downloaded 30 times
infolog.txt
(25.84 KiB) Downloaded 35 times
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

Same behavior - good game on some maps (barren), and on others (Comet, crossing4final) - increasing lag and game crash. Infolog is empty, log file is useless and doesn't have a single EE line. Has occasional WW lines for MoveFailed, but they are also present in a log from good game. (80.4, BA 7.01)
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Hmmm, that's quite worrying, since I didn't found any pathing errors. Can you show the ScopedTimer statistics? They are shown in the last lines of the logs.

<edit> It seems to be that military is choking up, I've been thinking about restructuring that part anyway. I wanna make it completely non-cheating in the nearby future.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

AFAIK lobby doesn't support it yet, but there is a possibility to have difficulty level for each AI. (You must have noted it when made the .lua). Perhaps on high difficulty it should be cheating as it is?

Small note why its good for it to cheat: the pro scout lemma: "if you are facing a pro player and there exists a way for enemy scout to kill your mex - it will be done". Its easy for human player to guess where the enemy's mexes are, so making AI behave like that is a good idea imo.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Ok, I've performed a silent update which should be much easier on the cpu and correctly pathfinding, so just re-download version 2.10.3. Although water maps are still very very experimental.
User avatar
Umrug
Posts: 141
Joined: 27 Nov 2006, 12:57

Re: A new artificial intelligent opponent - E323AI

Post by Umrug »

Using 80.4.1 + BA 7.1

Still phailing :/ Same stuff - lag spikes and crash after several minutes. Tested on crossing4final and barren.

infolog, traditionally, useless.
Log - aha interesting. Full of lines of following form:

[07:35] (II): CE323AI::UnitIdle Peewee(199, 233)
[07:35] (II): AttackTask(10) target(Construction Kbot) Group(1): amount(1) [Peewee(199, 233)] Assisters: amount(0) []
[07:35] (II): CPathfinder::addTask AttackTask(10) target(Construction Kbot) Group(1): amount(1) [Peewee(199, 233)] Assisters: amount(0) []
[07:35] (EE): CPathfinder::getPath pathing failed for Group(1): amount(1) [Peewee(199, 233)]
[07:35] (II): ATask::remove AttackTask(10) target(Construction Kbot) Group(1): amount(1) [Peewee(199, 233)] Assisters: amount(0) []
[07:35] (II): CPathfinder::remove AttackTask(10) target(Construction Kbot) Group(1): amount(1) [Peewee(199, 233)] Assisters: amount(0) []

AND

[04:21] (II): CE323AI::UnitIdle Construction Kbot(245, 481)
<...couple of lines like abouve...>
[04:21] (II): BuildTask(5) MPROVIDER(Metal Extractor) Group(4): amount(1) [Construction Kbot(245, 481)] Assisters: amount(0) []
[04:21] (II): CPathfinder::addTask BuildTask(5) MPROVIDER(Metal Extractor) Group(4): amount(1) [Construction Kbot(245, 481)] Assisters: amount(0) []
[04:21] (EE): CPathfinder::getPath pathing failed for Group(4): amount(1) [Construction Kbot(245, 481)]
[04:21] (II): ATask::remove BuildTask(5) MPROVIDER(Metal Extractor) Group(4): amount(1) [Construction Kbot(245, 481)] Assisters: amount(0) []
[04:21] (II): CPathfinder::remove BuildTask(5) MPROVIDER(Metal Extractor) Group(4): amount(1) [Construction Kbot(245, 481)] Assisters: amount(0) []


See? See? You are getting closer :) I'm sure its some retarded bug :) solve this and you'll have it working :) Perhaps try to output more info? What parameters the path function is receiving? Can you output the "to" coordinates?


Bonus - now lags and misbehaves on barren, where it was previously performing well.

Bonus - now doesn't recognize mexes close to the edge of the map (something you have on many maps).
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Hahhahaha,

Yeah I noticed. Amazing I tested on two maps and it performed in the sense that it could pathfind correctly and indd on barren it fails hard. Back to the drawing boards, I'll perform much more extensive testing before next release! I like ur optimism :P
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A new artificial intelligent opponent - E323AI

Post by hughperkins »

Hi Error323,

Your AI sounds very cool. I like the sound of the raiding and the threatmap. I was thinking of building a threatmap in my own at some point, I'll have to up the priority a little I guess ;-)

For the cheating thing, it seems like having the AI cheat a little makes the AI more fun to play against, and I guess it's not that hard to take a non-cheating AI and make it suddenly cheat - have perfect knowledge of the enemy units even without scouting - so it's still possible to play against other AIs I guess, as long as the AIs have a configurable option to cheat.

Question: to what extent is there a version of E323 available for a release version of Spring? I do have a git version of Spring built, but it runs really slowly on my machine for some reason, and also I'd rather have a stable target to play against.

Hugh
Post Reply

Return to “AI”