First release of JCAI - global AI - Page 3

First release of JCAI - global AI

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Slamoid
Posts: 237
Joined: 25 Jan 2005, 19:23

Further Clarification

Post by Slamoid »

A few questions:

First, in the Forces description, Batchsize, Category, and Minmetal do what exactly?

Second, in Cells, what exactly is a suppourt unit? Is that what that cell is supposed to make?

And lastly, what does the * and #s# operators mean?

Example:

Code: Select all

"corfav*2s3"
Thanks Zaphod, great stuff here! :shock:
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Alantai, you provide me with the error, but not any way to solve it.

I have installed JCAI correctly, as per the directions.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Using LUA gives AI configs the chance to use a universal format that both skirmish AI can use, and I dont want JCAI to fall flat when I'm done with TAI. To heck with what I've said before, I can see construction being solved in TAI soon which leads to Attack systems, that combined with a resource agent that's already highly aggressive and an initial build order, should kick your AI's ass. Of course that wouldnt be very good for competition so I'm inclined to help you somewhat. Firstly someone make him new AI configs, he hasnt the tiem to write them to be as effective as they could be.
LOL, You're not even able to fix your own AI and yet you claim all these things - you're a funny guy !
Furthermore, using the same universal format will only make them different in attacking and balancing, so I wouldn't like that.
And do you think I would be sitting still when you're AI would get better?
Besides, LUA shall open AI coding to a wider audience of people who cant or wont get VS .Net 2003.
The faster the code, the more data you can collect, the better your balances and choices can be calculated. I doubt using a scripting language has a good effect on that.


Some text explaining the forces, I added it in aiscript-help.txt


----- FORCES ------

current supported force group settings:

-category
Groups are divided into categories that can be build simultaneously
For example you'd want to have air forces in a different category than ground units,
otherwise either air or ground units are being build at a time, never both

-level
The level indicates the "power" of the unit group, when the force manager is selecting
a group type to build, it selects the group with the highest level that it is capable
of building

-batchsize
Number of units in a single group of this type

-minenergy
Minimum energy income needed for this group to be build, if current energy income is lower
than this, a lower level group type is selected for building
This is likely to be replaced by a balancing system in the future, that takes more stuff
into account.

-minmetal
Same as for minenergy

-maxspread
Maximum spreading of the group, when the outer group units are further away from each other,
grouping mode is selected and the units move to each other until the reach a spreading of groupdist

-groupdist
See maxspread

-task
task=raid:
** experimental **
this will attack enemy sectors with very few units, such as mexxes with little defense

task=attackdefend:
selects a sector to attack based on nearby friendly buildings and number of enemy units,
more enemy units is prefered here, but more friendly buildings is even more important, since it
could indicate an attack on the base.

Currently, if a group gets selected for build and there is no factory for it, it will lock up and never be build because it doesn't check for new factories. Will be corrected in the next release.

GroundZero: I don't have a direct fix, but it seems you're still running xta but with a WD commander. From the log:

Code: Select all

Running mod xta_se_v061.sdz
Meaning it will look for a config file named xta_se_v061.cfg, and not SpringWD.cfg
You can use either SJ's AIvsAI script or mine and modify GameType to SpringWD.sdz. Maybe it'll work then, otherwise I don't have clue right now :(

Warlord Zsinj:
You have to overwrite the current test.dll in aidll\globalai\, maybe that went wrong during the installation?
You seem to have the standard test.dll, which is a dummy test AI that counts.

Slamoid:
A support unit are buildings that fall outside the mex/factory category. You can use those fields to build solars, defense, etc

* operator: sets number of the specified unit/cell
s operator: set number of supports that have to be build before the child cell will be build.

childs="plant*3s2" will build 3 'plant' cells after 2 supports have been build.

Expect a bugfix release soon, this evening if not tomorrow, there are a couple of bugs currently that make scripts behave weird. Including that child cells request the builder type of the parent cell, instead of their own builder type - makes it impossible to get to level 2

Pfff, I think I'm done typing now :P
Thanks for all the feedback people!
Last edited by jcnossen on 18 Aug 2005, 13:59, edited 4 times in total.
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Re: Further Clarification

Post by Torrasque »

Slamoid wrote:
And lastly, what does the * and #s# operators mean?

Example:

Code: Select all

"corfav*2s3"
Zaphod wrote: *2s2 means it will build 2 childs of those, but only if at least 2 support buildings have been made (or skipped if they couldn't be made)
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post by IMSabbel »

Zaphod wrote:
Using LUA gives AI configs the chance to use a universal format that both skirmish AI can use, and I dont want JCAI to fall flat when I'm done with TAI. To heck with what I've said before, I can see construction being solved in TAI soon which leads to Attack systems, that combined with a resource agent that's already highly aggressive and an initial build order, should kick your AI's ass. Of course that wouldnt be very good for competition so I'm inclined to help you somewhat. Firstly someone make him new AI configs, he hasnt the tiem to write them to be as effective as they could be.
LOL, You're not even able to fix your own AI and yet you claim all these things - you're a funny guy !
Quoted for truth. I took a look at his source and his ai doesnt contain anything not-obvious (and the discussion in the "search spot for metal extractors" looked like a failed homwork exercise in computer science 101(how long it took to get even the obvious result of integrating over the metal extracter colecting range...)).


Keep up your great work, zaphod. Your AI actually does something (which is impressive), and the concept really looks extendable and promissing. I was seariously impressed seeing some scouts quickly in my base and planes doing systematic recon.

(and it would be really nice to get regular new releases, because i cant wait trying them out.)
And for that, a little bug-report:

-I tried a game with 2vs2, me+1ai vs 2 others on small divide. Which worked quite nicely. I wanted to see how the ai expands, and walked into my allies camp, set spectators 1 and waited. The one ai managed to secure the whole area i left quickly, and soon every metal extractor spot was taken. But it never produced ground units besides construction vehicles. All 3 instances.

Also, maybe the seach for a metal extractor location should check the last enemy presence status of the recon in the target sector, because the ai would happily send construction vehicles into the center of the enemy base (which is a waste of resources)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Currently, if a group gets selected for build and there is no factory for it, it will lock up and never be build because it doesn't check for new factories. Will be corrected in the next release.
IMSabbel, maybe this is causes it, so we'll see if the problem still exists in the next release.
Also, maybe the seach for a metal extractor location should check the last enemy presence status of the recon in the target sector, because the ai would happily send construction vehicles into the center of the enemy base (which is a waste of resources)
I noticed that yes, but it's not easily fixable - it would be necessary to delete sectors that have high number of enemies in them.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I was unable to fix it and keep OTA AI compatability. But I've scrapped that plan now and found a solution.

And I still think an AI is more than the layout of its config file.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

And I still think an AI is more than the layout of its config file.
Good for you, neither do I think that:
Furthermore, using the same universal format will only make them different in attacking and balancing, so I wouldn't like that.
But really, you shouldn't claim a winning AI before you have made one, otherwise you're just a poser.
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

...

Post by hrmph »

Sure there is more than the config file.... all of the actual code :)
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Thanks for the response Zaphod, I wonder how I change the gametype since I don't have a clue... :oops:
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

GrOuNd_ZeRo wrote:Thanks for the response Zaphod, I wonder how I change the gametype since I don't have a clue... :oops:
Have you tried with this http://taspring.clan-sy.com/temp/aiscript.txt and changed the gametype?
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

Post by hrmph »

Has anyone else been playing around with the config files?? After messing around for awhile, I've finally got a config that starts out by building an advanced vehicle plant, and a few fusions and mohos :) I can tell JCAI is really going to rock after a few versions!
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Well, in the script.txt file it's already on the aproperiate gametype, but it keeps loading XTA :(

[edit]

I ellegantly found a sollution, I renamed the WD main file to the XTA filename while renaming the XTA filename was changed to a .bak file.

I also changed the XTA .cfg file to load the WD files and it works, it builds infantry :) but unfortunatly the AI crashes randomly...
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

GZ any chance you're releasing WD as an official mod for 0.6 soon? (so the lobby can detect it etc)
In that case I could also test it.

I've finally got a config that starts out by building an advanced vehicle plant, and a few fusions and mohos :) I can tell JCAI is really going to rock after a few versions!
lol, I've been trying to that but couldn't work it out because of child nodes requesting parent builders... It builds it's own builders now so you script probably doesn't work anymore, but it's cool you managed to find a way :P
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

Post by hrmph »

Yeah I figured it wouldbe the first thing you fixed! :) Any idea when you'll release the fixed version?
Last edited by hrmph on 19 Aug 2005, 20:03, edited 1 time in total.
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

I've discovered a strange behavior :
I tried your 2ai script on Anglo-saxon Starfish Redux. Your AI built mex, plant, solar , even some planes, but nothing from the vehicule lab.

Then I typed .team 1 ...and your AI begin to build jeffy and then samson, as it has to do.

Even more fun, if .nocost is enabled, it will build a _mass_ of unit :)

Bravo Zaphod, I'm sure your AI will quickly be as good as the one from cavedog.
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

Torrasque wrote:I've discovered a strange behavior :
I tried your 2ai script on Anglo-saxon Starfish Redux. Your AI built mex, plant, solar , even some planes, but nothing from the vehicule lab.
I've had this happen to me, both randomly and on certain maps. On Desert dunes it does this every time, and on castles it does this about half the time.
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Yeah, the AI is not really attacking all the time, when it does, it usually a bunch of weasels...
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Here is a new release:

JCAI v0.11

It doesn't need to be posted on the news imo, since it still crashes so not much changes for the average user. However, a number of improvements and bugfixes have been done.
The script now includes building a bit of level 2 stuff and some better defense too. It's still unbalanced though, after I fix the bugs I will focus on a balancing system.

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

Changelog:

- fixed unit groups moving to sector (-1,0) if no good goal sector could be found.
- improved handling of failed building tasks - they now stop after 9 tries
- updated force info in aiscript-help.txt
- adapted log file functions so log file will also be saved if a crash occurs.
- optimized and improved force production and factory selection
- extended communication between parent and child cells
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

*cough*

We have SWTA working crash-free

*cough*

;)
Post Reply

Return to “Engine”