NTai XE10.1b - Page 69

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: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

Perhaps but I was pressed for time when I did it
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

When you release your XTA config and DJ has no problems with be releasing his BA 5.5 config Ill do an installer.
I'll get this done tonight, I cocked up the old one cos I got abit over enthusiastic with the b_rule stuff! :lol:
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

XTA config is finished for both arm and core, the full shbang. about 15 hours of work here! Im going to release a series of SP missions, which use all four of the main AIs; ranging from easy (2v2 on comet, you and a KAI vs two AAIs) to medium (you + KAI vs two NTAI) to hard (you + AAI vs KAI n NTAI) and impossible (You Vs KAI, NTAI, RAI)

however, been testing them, and atm NTAI is too hungry on the system.
I dont know any techinical stuff but you could try limiting the number of commands a frame, or doubling the time between checks, or cutting out useless checks etc, because im running a top range PC and by the 25 minute mark NTAI has got the framerate to a single figure, somthing needs optimising.

In terms of how it plays, it still does not mop up the last low threat enemy units at the end of a game (mex + solar), that'll be somthing to do with how the threat system works. Units that retreat for repairs never seem to receive orders again. the commander works better in NTAI than in any mod except KAI 0.12, reclaiming attackers and retreating intelligently. the only problems remaining are;

the new reclaiming

the unintelligent attack system

laaaagg

but if you can fix the laaaagggg then its ready to go because with a good config it can still take the other AIs to school.


http://spring.unknown-files.net/file/33 ... AA_CONFIG/

it plays both sides and is complete.

what mod should I config now?
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

There's two causes of slow downs in NTai, you have to remember that because it is so flexible it also gives you enough rope to hang yourself.

The first issue is build placement, this is what makes NTai cpu hungry. Try to keep the number of construction tasks / vehicles building stuff to a manageable level if you have 20 construction vehicles all trying to build a solar for instance you will see heavy cpu usage.

The second issue is overloading the engine, I found this was largely down to retreating units, you can alleviate this by setting more base pos tags in your config, this spreads the retreated (and now useless) units around the base and stops them jamming up and overloading the engine. You can see if this is your problem because the ping time will get progressively higher...

For me the top priority is to try get the retreated units operational again, after that look at a different threat matrix or something to make the attacking a bit smarter. The problem is AF doesn't have much time so we're going to need to get some C++ skills and do some stuff to help...
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

Reconciling the attack system to use the new task system would be ideal, it would completely change how attacking is structured and open up a huge number of options for attack behaviours that could be reached within 5-10 lines of code in a new task.

Trepans next big set of commits includes the LuaParser class which means that TdfParser is no longer reliable as that gamedata.tdf may be a gamedata.lua

So lua is going to have to be a future dependency of NTai.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

the lag from my config isnt pathfinding, its just the slowdown as you get more units and conunits demanding orders and doin checks etc
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

NTai has limited the number of commands it sent since v0.27

Infact it has the most comprehensive command caching sytem of all the AIs, better than AAIs, and JCAIs, KAI doesnt even have one.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

then what causes the epic lag as NTAI has more units? KAI /RAI/AAI do not cause lag in the same way so its not an engine/pathfinding issue..
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

to determine that I need to know what the units are actually doing.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

I'd like to see the attack system have some sort of priority based method. Identifying targets by their efficiency, proximity to its high value units and the level of defensive cover they have.

This should cover circumstances such as a LRPC being built with little defences to cover it, an undefended fusion reactor or units attacking the NTai commander. The key to it is the speed at which the calculations are done. Obviously the more often the method is updated the higher the cpu usage so its critical how efficient this method is.

I'm not sure how difficult this would be to implement but i don't think it would be too difficult...

Another thought I had was about retreating units, currently they're set to retreat to prevent the move failed problem. I've noticed that resurrected units head straight back off into battle, would it be possible to re-initialize the unit instead of calling retreat? By this I mean consider it destroyed and re create it as if it had been resurected? this is a full blown hack but might be worth testing...
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

possibly,

G->UnitDestroyed(unit);
G->UnitCreated(unit);
G->UnitFinished(unit);

It would be asigned to a new attack group tho so ti may just sit there for while untill the new group fills up.

Also learning values are already used for targetting, theres also hard defined targetting values but toolkit doesnt support them.

I think an Epic style demand based system for attacking might be appropriate withnumerous subsystems generating demand for a position to be attacked and modifying the values of demand.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

@IK
When you say lag is it the cpu usage or the ping times that go high? -or indeed both...

@AF
Have you ever tried to run NTai through a profiler? Redgate do a free trial of a profiler for .net that works really well. Might be worth looking into...
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

I havent a working debugger, what hope have I for getting a profiler going
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

i was under the impression you could debug in VS2005?
Also learning values are already used for targetting, theres also hard defined targetting values but toolkit doesnt support them.
what are the tags? I might add them to the toolkit...
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

DJ wrote:@IK
When you say lag is it the cpu usage or the ping times that go high? -or indeed both...
both

what is the diffrence between autotargetting or not again? i forgot
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

I didnt implement it because I find winforms needs a lot of nannying and it would need a lot of controls.

Hard targetting values would also quickly spiral out of control.

For a mod with 150 units, for each unit you would define 150 values.

That means at least 22,500 values to account for.

Hence why it was used in nanoblobz after argh requested hard targetting values.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Post by Satirik »

any update planned ? like "if" condition ? :)
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

the tasklists system is set. There will NEVER be if and while statements. It is not a programming language.

I have told you before satirik that if you want if statements wait for lua.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

The newest NTai has tremendous exponential lag (like 30s between updates), and retarded geo builders (look at the down right builder on the map Major_Madness3.0).

Can I have a NTai.dll just like the one I had included in Kernel Panic 1.3, but compiled for Spring75b2? This one worked very well in KP.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

or just the current NTAI with the lag reduced
Post Reply

Return to “AI”