Skirmish AI: E323AI 3.22.4 - Page 7

Skirmish AI: E323AI 3.22.4

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

Moderators: hoijui, Moderators

Post Reply
Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Re: A new artificial intelligent opponent - E323AI

Post by Smiff »

Error323, if you could post on each release which maps its been tested with, that would help us to know what we should be seeing/testing.
i've had a few short games now, it definitely starts well, not sure that its really teching up though? does it play well later? haven't really had time to find out.. seems to be crashing less though, good work!
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Hey Guys,

The problem is the pathfinder, what appears to happen is that most of the times a path cannot be found (this is definitly a bug). On a failed pathfinding attempt, the task and path itself is removed:

Code: Select all

Task task = requestTask(ATTACK);
task.add(group);
pathfinder.add(task);

if (pathfinding failed)
  task.remove();
However the next iteration it adds the same task again and the path fails again, this is looped forever. Now it attempts to find a path every iteration which is quite expensive, thats why it lags.

I'll figure it out this evening (working now), its just that it seemed fixed while it isn't >_<. When I tackled the problem, lags will be gone and it should be one smooth machine again ;)
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

hughperkins wrote: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 ;-)
Thanks, yeah you probably should. I hope you can create your A.I. such that it beats mine :D Then the battle is on :twisted:
hughperkins wrote: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.
I'm thinking about a hybrid model that can easily switch between cheating and non cheating.
hughperkins wrote: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.
See the readme in the git repo (there isn't really a stable version atm, its all still alpha, but soon it will be fixed).
Last edited by Error323 on 07 Sep 2009, 14:26, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: A new artificial intelligent opponent - E323AI

Post by AF »

hugh, threatmaps are great, though I found that when meddling with mine, optimizing values and how long they linger etc was a big deal and how often it would be increased and the algorithm to combine them. Exporting as TGA helped a lot
User avatar
TheMightyOne
Posts: 492
Joined: 26 Feb 2007, 14:32

Re: A new artificial intelligent opponent - E323AI

Post by TheMightyOne »

make the AI cheat once it realizes that its losing :twisted:
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A new artificial intelligent opponent - E323AI

Post by hughperkins »

Hi E323,

Well, the good news is I managed to get your AI to run on my PC, and in the same game as HughAI.

The bad news is that E323 absolutely slaughtered HughAI. There was my commander standing amidst the wreckage of charred, smoking used-to-be solar collectors and metal collectors, with a bunch of fleas whizzing around him, waiting for the kill.

So, great, when I wanted plausible competition, I really meant I wanted someone I could pretend to struggle to beat, not someone who would absolutely annihilate me :twisted:

So, thanks, when I next want plausible competition to make me look good by not being better than me, I know who NOT to call :lol:

Nice work, E323, but ... don't get too complacent ;-) ... I've implemented maphack, though I don't dare try a rematch just yet ;-)

Hugh
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.11.3 Tue Sep 8 20:09:02 CEST 2009
Version 2.11.3 (Ultralisk) is out, changelog:
  • Massive Pathfinding refactor, resulting in much better pathfinding
  • Optimizations
  • Higher preference for solars
E323AI SO/DLL: E323AI-v2.11.3-Ultralisk
E323AI SRC: E323AI@github

The downside is that it pre-calculates pathing maps. On large maps, this can take quite a while (please be patient), but results in faster ingame performance. I will cache this asap.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: A new artificial intelligent opponent - E323AI

Post by xyz »

Error323 wrote:The downside is that it pre-calculates pathing maps. On large maps, this can take quite a while (please be patient), but results in faster ingame performance. I will cache this asap.
This does not sound like a good idea. The calculation takes really long, and I doubt users will wait for it to finish; caching it will not really solve the problem (I usually do a clean install every time there is a new spring version).

Ohh the AI still crashes (I had to truncate the log file, it was too big):
http://pastebin.com/m332707b8
Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Re: A new artificial intelligent opponent - E323AI

Post by Smiff »

disagree with above.. i want it to pathfind as well as possible and don't mind a wait.. when you can cache, even better.
although, stability and performance are really important, i'd rather see it play a few maps really well than all of them roughly.
ato
Posts: 10
Joined: 09 Sep 2009, 05:32

Re: A new artificial intelligent opponent - E323AI

Post by ato »

xyz wrote:
Error323 wrote:The downside is that it pre-calculates pathing maps.
This does not sound like a good idea. The calculation takes really long, and I doubt users will wait for it to finish; caching it will not really solve the problem
My AI is still mostly on the drawing board but I was planning to handle this by doing the pre-calculation in a background thread at the start of the game (when there's no on-disk cache). Until it's done you can just do uncached pathfinding (usually you'll only have a couple of units at the start of the game so this shouldn't be too costly).

Something else that occurred to me is to see if it's possible to make use of the pathfinding info that Spring itself creates (see ~/.spring/maps/paths). I haven't looked into what exactly this is yet though -- it may not be useful.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: A new artificial intelligent opponent - E323AI

Post by imbaczek »

spring's pathfinder is already exposed via the AI interface; it works, but doesn't cut it for anything advanced.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: A new artificial intelligent opponent - E323AI

Post by Google_Frog »

Have you tried against CRAIG? It's a non-cheating Lua based AI.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

imbaczek wrote:spring's pathfinder is already exposed via the AI interface; it works, but doesn't cut it for anything advanced.
Indeed, it cannot take a weight overlay which I use for pathfinding to avoid enemy contact.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Google_Frog wrote:Have you tried against CRAIG? It's a non-cheating Lua based AI.
Hmmm no, I was under the impression that CRAIG was targetted specifically at 1944. Which radically differs afaik.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

xyz wrote:
Error323 wrote:The downside is that it pre-calculates pathing maps. On large maps, this can take quite a while (please be patient), but results in faster ingame performance. I will cache this asap.
This does not sound like a good idea. The calculation takes really long, and I doubt users will wait for it to finish; caching it will not really solve the problem (I usually do a clean install every time there is a new spring version).

Ohh the AI still crashes (I had to truncate the log file, it was too big):
http://pastebin.com/m332707b8
I can't figure out why it crashes there though, hasn't happened to me at all yet :/ And for some reason I cannot use the pastebin information for debugging, it gives me jabberish.

I think I have found a way to reduce prepathing times and improve pathfinding overall. The problem is the discretization of the slopemap, I have to downscale it for the current cpu's to perform realtime pathfinding using A* as search algorithm.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: A new artificial intelligent opponent - E323AI

Post by yuritch »

Google_Frog wrote:Have you tried against CRAIG? It's a non-cheating Lua based AI.
It's resource cheating on all settings except easy. And most probably it still has maphack on easy as well.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A new artificial intelligent opponent - E323AI

Post by hughperkins »

Error323 wrote:Thanks, yeah you probably should. I hope you can create your A.I. such that it beats mine :D Then the battle is on :twisted:
Here you go:

http://manageddreams.com/hughaireplays/ ... 23.tar.bz2

Somewhat cryptically named replay I know ;-)
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Noooooo my precious :P good work. Though the version is a bit crappy :/ KAIK beat it too today bleh. I'll check the replay when I get home!
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A new artificial intelligent opponent - E323AI

Post by hughperkins »

To be fair, it's yesterday's E323, because I didn't feel like sitting in McD's for 60 minutes watching the whole world build...

Hugh
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A new artificial intelligent opponent - E323AI

Post by Error323 »

Yeah, I know... working on it tonight :D
Post Reply

Return to “AI”