NTai XE10.1b - Page 60

NTai XE10.1b

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

Moderators: hoijui, Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Increase threshold percentage is a boolean. If true then the value of the other tag is a number between (0%)0 and 1(100%) or higher, aka NTai does threshold*tagvalue.

If the tag is equal to 0, then the calculation changes to Threshold+tagvalue.

And yes, at the moment the attack routine system is seperate from the tasklist system. The two will interfere with eachother. Attackers can have tasklists, that restriction was removed.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

explain that in idiot language?
User avatar
lale
Posts: 73
Joined: 29 Apr 2007, 08:36

Post by lale »

Warning! - Posting interpretation of others post, is per definition a bad idea :-)
AF wrote:Increase threshold percentage is a boolean. If true then the value of the other tag is a number between (0%)0 and 1(100%) or higher, aka NTai does threshold*tagvalue.

If the tag is equal to 0, then the calculation changes to Threshold+tagvalue.
With initial_threat_value =10: (not tested)
Increase threshold percentage =0
And
Increase threshold value =10 (aka add 10 units per attack)
  • Attack #1 10 units
    Attack #2 20 units
    Attack #3 30 units
    Attack #9 100 units
Increase threshold percentage =1
And
Increase threshold value =0.10 (aka 10 percent)
  • Attack #1 10 units
    Attack #2 11 units
    Attack #3 12 units
    Attack #9 24 units (Assuming no round off)
AF wrote: And yes, at the moment the attack routine system is seperate from the tasklist system. The two will interfere with eachother. Attackers can have tasklists, that restriction was removed.
And since tasklists takes precedence over attack routine :?: :
An attacker with construction abilities (aka builder=1 in fbi file) without a tasklist will do nothing, due to missing tasklist?
Also, adding a tasklist for attacker with keywords like b_na or b_idle will NOT make unit join attack group?

The above does let a construction unit carry arms, to defend it self. (This works fine!)

- Anyway, since NTAI doesn├óÔé¼Ôäót do enemy-mex hunting (unless IK has success in his attempts) this might not have solved anything.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

initial_threat_value=2;
increase_threshold_value=10;
increase_threshold_percentage=0;

also did nothing
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

also, what you posted did nothing
do the tags need to be in a praticular place/praticular order?
User avatar
lale
Posts: 73
Joined: 29 Apr 2007, 08:36

Post by lale »

Think your right IK, I'm missing a piece in the puzzle.
AK says:
threshold*tagvalue

if tagvalue is increase_threshold_value, what then is threshold?

I assumed it was a lower limit for which NTAI makes an attack group. aka for the first group: initial_threat_value. But this might be wrong :?:

Tags should be in AI section of config file, along with inital_threat_value. (Order in AI section should be unimportant)

*lale left for testing...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If a unit has tasklist it will follow it.

Not units that ahve builder=1; in fbi
Not untis that arent atatckers

Any unit. If you assign a unit a tasklist it will attempt to follow it regardless of what that unit is, even if its a wind generator.

B_NA and b_idle dont do anything, b_na is an error return value in XE9.7+ and is ignored. b_idle is the same.

The attack systema nd the task system are two different systems. You cant make them interact as you say. If an attack unit building a mex and an enemy comes near it the unit will go and attack leaving the mex half built, then when done itll get a unit idle and the next task will occur.

The best I can say is to fill the attack units task lists with lots of b_repair style stuff around the things it builds aswell as b_offensive_repair.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

And ye there are 3 tags for attack group size.

one controls the initial value
one controls the magnitude of its increase
one controls how that magnitude is itnerpreted (%? or +?)
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

yes, what are the tags to i can test them in the config?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

chaser.cpp Init() wrote:G->Get_mod_tdf()->GetDef(threshold,"5", "AI\\initial_threat_value");
G->Get_mod_tdf()->GetDef(thresh_increase,"1","AI\\increase_threshold_value");
G->Get_mod_tdf()->GetDef(thresh_percentage_incr,"0","AI\\increase_threshold_percentage");

Code: Select all

[AI]
{
     initial_threat_value=5; // Attack group number 1 has 5 units
     increase_threshold_value=1; // increase by 1 unit each attack
     increase_threshold_percentage=0; // above value isnt a percentage
}

Code: Select all

if(thresh_percentage_incr){
	threshold *= thresh_increase;
}else{
	threshold += thresh_increase;
}
G->L << "new threshold :: "<< threshold<<"\n";
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

dosnt work.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

G->L << "new threshold :: "<< threshold<<"\n";
Thats a log statement. Look in your logs and show me these values. It doesnt work just isnt helpful.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

ok sorry ill check
User avatar
lale
Posts: 73
Joined: 29 Apr 2007, 08:36

Post by lale »

With

Code: Select all

[AI]
{
	initial_threat_value=2;
	increase_threshold_value=2;
	increase_threshold_percentage=0;
Running above in a game for 1 hour, with over a thousand units generated.

The game resulted in a 40mega NTAI log file and:
No entries of "new threshold", "threshold" or just "thres****" made in the NTAI log file.

Either I'm doing something really wrong (The game does send groups of 2 units into attack, but no group of 4)
Or this part of the NTAI og log-system isn't working.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It turns out I made a mistake and attack group sizes where never getting larger at all. I'll make a release tomorrow with a few other tags.
User avatar
chillaaa
Posts: 234
Joined: 16 Mar 2005, 00:12

Post by chillaaa »

Hi AF,

I've been farting around with a basic NTAI config for NOTA while i'm on holidays. I've found that as core it likes to try and build a shipyard as its factory with the b_factory. See the following log http://chillaaa.homeip.net/swta/NOTAcoreAI.txt.

The only way i've changed it to work is to make a new task list specifying the core kbot lab, but that is obviously not ideal.

Thanks in advance.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Perhaps 3 tasklists with each referencing one factory? One air one vehicle one kbot?
User avatar
chillaaa
Posts: 234
Joined: 16 Mar 2005, 00:12

Post by chillaaa »

Cool, I'll try that.. I just had a go with an ARM AI and it does the same so i'll try it.

Thanks again
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Toolkit 0.26b

Adds the attack group increment entries, and geothermal build algorithm controls.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Post Reply

Return to “AI”