Page 10 of 38

Re: A new artificial intelligent opponent - E323AI

Posted: 16 Sep 2009, 22:42
by hoijui
Error323 wrote:I need to figure out how I can autocopy the configs using cmake with a 'make install', anyone knows?
The contents of the data/ dir of your AI is copied reversely to to the install dir (eg. spring/AI/Skirmish/E323AI/2.12.0/) you should locate files with the file locating methods of the Skirmish AI interface. this way, it will create files in the writeable data dir, and locate fiels for reading in all the data dirs...
ahh.. well... these functions are not really available in the Legacy interface.. though.. i am not even sure about this anymore.. ther is the locate file command at least, that exports the most important functionality.
..am alreayd tired again, maybe we can have a chat if i did not explain what you need in this post.

Re: A new artificial intelligent opponent - E323AI

Posted: 17 Sep 2009, 14:32
by AndiNo
Argh wrote:just another OTA AI guy
Would be a cool user title though: instead of "AI coder" use "another Original Total Annihilation Artificial Intelligence coder-guy" :mrgreen:

Re: A new artificial intelligent opponent - E323AI

Posted: 17 Sep 2009, 15:59
by lurker
Except 'OTA AI guy' to me, is someone that made an 'AI' for OTA, which are basically config files for what units to make.

Re: A new artificial intelligent opponent - E323AI

Posted: 17 Sep 2009, 17:30
by AF
Ill have you know OTAI didn't rely on configuration files until late into its life, and even then, they were experimental, and unnecessary. ;p

Re: A new artificial intelligent opponent - E323AI

Posted: 19 Sep 2009, 07:52
by YokoZar
AF wrote:Ill have you know OTAI didn't rely on configuration files until late into its life, and even then, they were experimental, and unnecessary. ;p
on the other hand by default OTA AI would make hovers and metal makers on all land metal maps

Re: A new artificial intelligent opponent - E323AI

Posted: 20 Sep 2009, 01:56
by 1v0ry_k1ng
unneceserry feature request:
taunting!

have taunts triggered when it wins, when it does loads of damage, when it kills a com, when it kills a factory etc
im sure the community can compile a long long list of taunts so they dont get repetetive either :D

Re: A new artificial intelligent opponent - E323AI

Posted: 20 Sep 2009, 16:15
by Achilla
1v0ry_k1ng wrote:unneceserry feature request:
taunting!

have taunts triggered when it wins, when it does loads of damage, when it kills a com, when it kills a factory etc
im sure the community can compile a long long list of taunts so they dont get repetetive either :D
Lol, that would be immersion breaker for me ;d

And it's better fit for widget than for a part of the AI, I think :wink:

Re: A new artificial intelligent opponent - E323AI

Posted: 23 Sep 2009, 10:47
by hoijui
I ran a short test.
sorry, i can not really say anything about its supremacy, as i can not run it long enough (risk or freeze or X session) on this machine. I hope to run a few such tests in the weekend with a friend.
For now:
I ran 2.12.0 in gdb, and after a few minutes (a game against RAI), it already ran quite poorly. I noticed that a LOT of messages get printed to the console (see code block below).
I am running a DEBUG3 build; is there less message spam on a release build? can i limit off the messages somehow otherwise?

Code: Select all

[05:06] (EE): CUnitTable::canBuild failed to build MOBILE | ARTILLERY
[05:06] (EE): CWishList::push failed for Kbot Lab(4384, 1931) categories: MOBILE | ARTILLERY
[New Thread 0x993c0b90 (LWP 16988)]
[Thread 0x993c0b90 (LWP 16988) exited]
There are really a lof of threads beeing created and destroyed shortly after again. Is this part of the path finder?
As i got teached, thread creation and killing is relatively expensive...
could it possibly help to reuse the threads? (eg: Thread Pool)

Re: A new artificial intelligent opponent - E323AI

Posted: 23 Sep 2009, 11:24
by Error323
Hey Hoijui,

About the errors in the log, I think ur not using the latest config file located in git and are possibly playing core, or not using a predefined config at all? Try latest git config plz. About the creation and destruction of threads, it does reduce timings, but indeed threads are destroyed and created constantly. This is threaded, because it resets the nodes in the entire grid for a certain MoveType, because of the ingame repathing during pathfollowing.

Re: A new artificial intelligent opponent - E323AI

Posted: 23 Sep 2009, 11:37
by hoijui
aaa ha!
i just had a lok at your AI...
feels like i neve rdid before.. can not be!

about the config files:
please have a look at the directory structure of the other AIs, especially AAI. the data subdir is meant to contain everything that has to end up in the install data dir of your AI, not just for the two AI*.lua files. also, if you want, you could put your sources in a subdir (eg src), though that is not needed.
I recommend to use the data subdir at least, as it will work better with CMake, SCons and in make windows installer integration easier.
-> no need of manual config files copying when compiling.

i did use ARM (by accident, i didnt know i have to use arm ;-) )
and yeah.. i did not use the config files. really stupid, as i read it myself in this thread, many times, that they are needed... DOH! :D

Re: A new artificial intelligent opponent - E323AI

Posted: 23 Sep 2009, 11:44
by Error323
Interesting, I was not aware about everything in data/ being copied automatically. I'll fix that.

Re: A new artificial intelligent opponent - E323AI

Posted: 24 Sep 2009, 00:21
by bartvbl
nice AI, although it has a bit too much to do it seems...
The game seems to hang a bit, and that a few times per second.
Something is making much loops?

Re: A new artificial intelligent opponent - E323AI

Posted: 25 Sep 2009, 02:21
by hughperkins
Hi E323,

Well, I set up a series of matches against HughAI .... and E323AI absolutely slaughtered HughAI:

http://manageddreams.com/ailadder/viewresults.py

Nice work E323. Your AI rocks.

Re: A new artificial intelligent opponent - E323AI

Posted: 25 Sep 2009, 09:39
by Error323
Hey Hugh,

Thanks, though I don't understand completely. I thought your A.I. also won a couple of times in the past? What happened? Anyway, the AI ladder is very cool! Ur building that stuff with the speed of light though lol xD.

Re: A new artificial intelligent opponent - E323AI

Posted: 25 Sep 2009, 13:32
by hughperkins
I thought your A.I. also won a couple of times in the past? What happened?
Yeah, I must have fluked out before somehow. I dunno, can't really work on two projects at once ;-)
Anyway, the AI ladder is very cool! Ur building that stuff with the speed of light though lol xD.
Thanks!

Re: A new artificial intelligent opponent - E323AI

Posted: 25 Sep 2009, 19:56
by hoijui
about the threads again:
I did not want to suggest making it unthreaded. what do you think about the thread-pool idea?

On my single core Athlon XP 2500+, running KAIK vs E323AI, E323AI uses more then 10x as much CPU time then KAIK, and more then half of the total CPU time used by spring (early game, it seems to go down there, percentualy, but very slowly).

Re: A new artificial intelligent opponent - E323AI

Posted: 25 Sep 2009, 20:48
by hoijui
found a SIGSEGV.
tried with the version currently in spring master, and with your latest spring master; happens in both.
the attached stack trace is from a self compiled build on mingw, i am on winXP.
it happens very early in game, when building the first building, or when that finnished, or the second one is beeing built.. somewhere around there.
also, it did not happen in the KAIK vs E323AI game, but always seems to happen in the following setup:
brazillian battlefield
4 AIs, 4 allyTeams, me beeing spectator
KAIK, RAI, AAI, E323AI

from the stack trace, it looks like a threading issue to me.
could be that my systems resources are more at the limit with 4 AIs, and that this is hte reason why it happens with 4 but not with 2 AIs. could be somethign else :/

shout if you need more info.
i will have a small LAN tomorow, and would like to use your AI there.
Maybe the crash will not happen on other machines...
eager to try it :D

Re: A new artificial intelligent opponent - E323AI

Posted: 27 Sep 2009, 09:40
by Error323
hoijui wrote:about the threads again:
I did not want to suggest making it unthreaded. what do you think about the thread-pool idea?

On my single core Athlon XP 2500+, running KAIK vs E323AI, E323AI uses more then 10x as much CPU time then KAIK, and more then half of the total CPU time used by spring (early game, it seems to go down there, percentualy, but very slowly).
Heh yeah, its constantly repathing (also for eco units, e.g. commander), which is costly.

About ur stacktrace, we talked about it on irc, given the location of the error I think its a memory problem. I'll see if I can cut down memory and find leaks.

Re: A new artificial intelligent opponent - E323AI

Posted: 27 Sep 2009, 17:34
by Error323
UPDATE v2.13.1 Sun Sep 27 17:35:04 CEST 2009
Changelog:
  • Less memory usage
  • Better threat assesment
  • Sometimes a lovely crash
E323AI SO/DLL: E323AI-v2.13.1-Ultralisk
E323AI SRC: E323AI@github

So I disabled threading because it was a fast and ugly hack. Also sometimes it crashes and I can't figure out why yet. If people are thinking damn, I should help make this thing faster and more epic. Drop me a line somewhere and access will be granted 8).

Re: A new artificial intelligent opponent - E323AI

Posted: 27 Sep 2009, 18:17
by hughperkins
For the pathing, I mean, it's not my AI, but I can't help thinking: do you need to path-find at such a fine granularity? I mean: Spring itself will take care of the low-level pathing, and then, basically, as a human, if there's some guardian bombarding, we won't micromanage to follow exactly the curved arc around the edge of the guardian, but we'll just roughly stay out of its arc of fire, so, along similar lines, and avoiding breaking this paragraph into shorter sentences :-P , what do you feel would be the impact, positive or negative, of pathfdining at a courser granularity?