greenai version .01

greenai version .01

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

Moderators: hoijui, Moderators

Post Reply
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

greenai version .01

Post by greenail »

Here is my first AI made for NanoBlobs. I plan on documenting a bit of it in the wiki. as i speak it's batteling blobkai, neither of which I think will win. It has no seek and destroy code yet, just survival code.


Image
Image

As a side note the engine desn't seem to like this size battle, i noticed the memory footprint it is using is quite small, 131MB in memory, and 270MB in VM. I have 2GB so there is plenty of room which makes me think there is tons of room for speed optimizations in the engine.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

So using more memory should make it faster following your reasoning? I think it should be possible to reduce the memory footprint and get it faster. It will improve cache performance too..
Not that I have any motivation to do so, but it should be possible.
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post by greenail »

Well hashes sort faster than arrays, but they take up more storage... that's what I was saying.

My game against BLOBAI crashed after about 36k frames and several overloard bombs went off

Image

note the water in the crater, i've notice games usualy crash when a big explosion has gon off like a commander going up. perhaps it has to do with that routine.

Image
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Crazy stuff there :shock: NanoBlob is so much like setting a beserk VonNeumann machine loose, it's a little scary sometimes, watching the seething hordes. The next version will have some better ramping on that phenomenon so that it won't get quite as out've hand hehe...
User avatar
DeathHawk
Posts: 278
Joined: 19 Oct 2005, 02:02

Post by DeathHawk »

OH MY GOODNESS!!!! :shock: What have you done!! its all over the place like a dogs dinner and you can hardly see the ground because its covered by units.

Good start anyway :-)
Kelson
Posts: 76
Joined: 29 Oct 2005, 08:32

Post by Kelson »

Games used to crash when big explosions occured - that is greatly reduced now. Fritokane and I self-destructed 400 stacked nuclear mines earlier and made a might deep crater in the moon (-3200 depth on cometcatcher). Unfortunately, the 2200+ stacked nuclear mine detonation killed the program (after about 10 minutes the program decided that was enough and forced itself to quit - some optimization for 'ridiculous damage to lots of close units' would be beneficial in this (never-going-to-happen) case).
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post by greenail »

I think 2 overlords, or 2 lords went up to cause that crater, if you look at the radar map on the 3rd image you can see another detonation, this is the one that make the game fail. I'm not sure how muchterain deformation the engine can handle before failing.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

That overflow error mesage thing happens udner NTAI when untis get stuck in the factories.

I solved the problem by making the AI call a second function rather than calling the engine directly to issue commands. Then the comamdns where sorted by priority and cached, then every 2 or 3 frames it eecuted them untill it met a threshold, say 1/2/3 that way the network buffer isnt overflowed with ltos and ltos of commands, which is probably what has happened with you, having all those untis building and moving around.
User avatar
DeathHawk
Posts: 278
Joined: 19 Oct 2005, 02:02

Post by DeathHawk »

your not wrong there Its an overflow alright lol imagn using all that to attack i mean DAM it will give everyone a run for there money.

LOl greennail dont worry i am not ditching you I like it But hell that Ai of yours is Crazy :P !!!
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I know nothing at all about game development.

That having been said, shouldn't more memory use improve game performance? I mean, games like HL2 et al will allow you to set their stack size to whatever you want.... Yeah, I have no clue. Just seems like if there's a ton of memory not even being used....... :? :? :cry:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

more memory use == better performance

and

more processing == more memory usage

therefore more processing == better performance

and we all now that more processing means more lag and slower speeds

therefore

better performance == more lag and slower speeds


Now do you see?
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post by greenail »

this has gone way off topic, perhaps we need to post a performance thread in the development forum, I have running spring with a profiler on my todo list. I think the code needs to get stable with the linux bits first, but there is no reason after we have a stable cross platform codebase that some tuning can't be explored.
Post Reply

Return to “AI”