ZcAIn introduced - 0.02

ZcAIn introduced - 0.02

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

Moderators: hoijui, Moderators

cain
AI Developer
Posts: 124
Joined: 09 Aug 2005, 10:04

ZcAIn introduced - 0.02

Post by cain »

I've done some progress with mine AI:

http://www.fileuniverse.com/?p=showitem&ID=1658

ZcAIn AI

version 0.02

added features

- complete builder handling
- auto rebuild of destroyed buildings
- a little hardcoded ugly script, build a simple base
and take over an hotspot (if you don't attak =) )

bugfix

- killed units doesn't crash the AI anymore
- more robust order and unit handling
- moved some more code to find mexes into the
unit
- moving units goes to their pos
- units does not remain stuck anymore after a
order is completed

known bugs

- save/load of map informations doesn't works
- some orders in the queue are never executed
(notice the three mexes to build on the hot
spot - and that only one is actually built.
concurrency problem?)
______________________________
version 0.01

initial release

current features

- metal handling of any map
- ability to find best metal position in a zone
- ability to find best metal zone in a map

current bug

- does nothing useful, apart a lot of aircrafts and mexes
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmm, perty little thing you got there.

*cain gets a cookie*
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

well i dont know if it happened by accident or its part of your strategy but after building some solar plants and an aicraft factory your commander walks around the map until it finds the players base and attacks it...
cain
AI Developer
Posts: 124
Joined: 09 Aug 2005, 10:04

Post by cain »

*damn* I think ive got ridden of that bug. it happens as the returned pos from closestbuildsite was 0,0,0 . I think I've putted a check on this. better recheck. what map was that? i've never see this on small divide
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

no it wasn´t on smalldivide but on river jale (its not one of the standard spring maps..)
User avatar
Stanky105
Posts: 7
Joined: 04 Apr 2005, 05:07

Post by Stanky105 »

Cain,

I have tested your AI on several maps, and so far it does nothing at all, the commander just stands there.

Did I install it correctly? I put the main zcain folder into the AI folder, but took out the .dll and put it next to the other .dll's in the global ai folder. The rest of the files are sitting in the zcain folder inside the globalAI folder.
cain
AI Developer
Posts: 124
Joined: 09 Aug 2005, 10:04

Post by cain »

how did you tested it? tha only way to make it do something is to plai with the globalai test script, corrently there are some check that miss for plaing the ai from the lobby. I'll download river jale soon to make some tests. thanks for the reports. however: the install consist only in copiing the dll in the globalai folder. the other files are just the sources of the ai
User avatar
Stanky105
Posts: 7
Joined: 04 Apr 2005, 05:07

Post by Stanky105 »

cain wrote:how did you tested it? tha only way to make it do something is to plai with the globalai test script, corrently there are some check that miss for plaing the ai from the lobby. I'll download river jale soon to make some tests. thanks for the reports. however: the install consist only in copiing the dll in the globalai folder. the other files are just the sources of the ai
Oh, ok... yeah I was trying to play it from the multiplayer lobby. I did install it correctly, just didn't play it correcty... :oops:

I'll try the other route and see if I have better luck.
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

i works just fine from the lobby :wink:

all u need to do is put zcain.dll into \aidll\globalai\
and then open the lobby and begin game and push the Reload it the bot list :wink:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

WHAIDUIFNNGIUGBNJIN

You havent befuddled your cource code after compiling before you released have you? I see a 1000% accuracy drop in your mex routines when they are itnegrated into NTAI from this version, infact apart from telling me there are no mex positions whatsoever they crash the game everytime I build a mex.
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

Is it normal that in the AILog.htm , every map size is detected as 32*32?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

AILog.htm simply calls callback->GetMapWidth()/32 or I think thats it. Maybe it's just a co-incidence that you're reading the same log bti voer and over again instead of scrolling down? Or maybe your maps are all 32x32, atm NTAI detects brazillian battlefields as 16x16 I think, if thats wrong I'll tweak it again.

But ncie to know that there is someone else who has an AILog.htm
cain
AI Developer
Posts: 124
Joined: 09 Aug 2005, 10:04

Post by cain »

actually, there's no change altsoever in the metalhandler class. just diff it if you don't believe
CaptainMaim
Posts: 265
Joined: 04 Sep 2005, 01:25

Post by CaptainMaim »

ZCain AI crashes when a unit get captured. (Spesifically my commander captured a rather rude Core Construction Aircraft who was insistant upon building a mex right next to my starting point.) I captured the unit, he turned blue and the game crashed with a DLL exception Error.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Currently all AI's crash when units are shared or captured, it's simply impossible to detect it.
User avatar
Stanky105
Posts: 7
Joined: 04 Apr 2005, 05:07

Post by Stanky105 »

Masse wrote:i works just fine from the lobby :wink:

all u need to do is put zcain.dll into \aidll\globalai\
and then open the lobby and begin game and push the Reload it the bot list :wink:
.....weird, it never works for me when loaded in the lobby, the commander just sits there.
CaptainMaim
Posts: 265
Joined: 04 Sep 2005, 01:25

Post by CaptainMaim »

Zaphod wrote:Currently all AI's crash when units are shared or captured, it's simply impossible to detect it.

Oh. So much for "Dead or alive"... Aquiring enemy units is now just "Dead Only." Yar! Kill 'em all! No Bounties for the live ones!
Guess they should include that in another AI interface update then eh?

Stanky105 wrote: .....weird, it never works for me when loaded in the lobby, the commander just sits there.
What about your Spring version? You know the lastest NTAI only works on the lastest Spring. .65b2... Not .65b1 (I know I tried, and I got the brain dead commander too.)
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

Perhaps a belong flag? Something along the lines of IFF tags, so that it only attempts to issue orders to units with a flag indicating they own it.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

lmao, to chekc if a unit has been captured, simply keep a log of all your untis and every now and again do an iterative loop testing each unti by calling the itnerface and asking which side that unit id belongs to then comparing it to what your side is, and if there are any mistmatches then that unit has been captured.
CaptainMaim
Posts: 265
Joined: 04 Sep 2005, 01:25

Post by CaptainMaim »

Alantai Firestar wrote:lmao, to chekc if a unit has been captured, simply keep a log of all your untis and every now and again do an iterative loop testing each unti by calling the itnerface and asking which side that unit id belongs to then comparing it to what your side is, and if there are any mistmatches then that unit has been captured.
The crash happened immediately, so I don't think that periodically checking is going to work. Unless by "every now and then" you mean per second. Cause once that plane's paint turned blue the game was through.
Post Reply

Return to “AI”