NTai XE10.1b
Moderators: hoijui, Moderators
No it doesnt atm.
Right now there are enough configs built and released for 1 size fits them all style configs nevermind multiple configs for map specific gameplay. If I implemented it it would be sued for 4 or 5 maps on BA and that would be it. There'd be no mass flood fo configs and the feature would be wasted.
How do I know this? Because before the config format changed NTai supported it, and in the stretch august 2005-march2007 nobody implemented a single map specific config.
Right now there are enough configs built and released for 1 size fits them all style configs nevermind multiple configs for map specific gameplay. If I implemented it it would be sued for 4 or 5 maps on BA and that would be it. There'd be no mass flood fo configs and the feature would be wasted.
How do I know this? Because before the config format changed NTai supported it, and in the stretch august 2005-march2007 nobody implemented a single map specific config.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
more than that you could config AI's to play in different styles, so you could play against an aggresive or defensive ai or one that attacked with mostly aircraft.
Don't think it would be that difficult to implement but would require some work to a lobby to allow you to pick which config the instance of NTai loaded as well as NTai being changed to listen for a config modifier.
I think there are more important things to concentrate on though -Mex upgrading for one and defence placement for another.
Don't think it would be that difficult to implement but would require some work to a lobby to allow you to pick which config the instance of NTai loaded as well as NTai being changed to listen for a config modifier.
I think there are more important things to concentrate on though -Mex upgrading for one and defence placement for another.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
I'm getting conflicting reports over cpu usage. Nobody has told me any patterns or anything helpful other than
a: NTai CPU usage is low
b: NTai CPU usage is high
c: It gets laggier as the games gets longer (unavoidable, all AIs will get slower as the game goes on)
NOBODY si suggesting a replacement for defence placement. Theyre simply sayign ti needs to eb solved. If you cotninue to do this then thigns wont get any better I assure you, defence placement will be just as bad in a year as it is now ebcause nobody ahs fofered suggestions on howto improve it.
All mentions of KAI defence placement will be ignored with a vengeance. NTai has no pathfinder and I'm not spending several months implementing and learning the intracacies of pathfinding.
Attack behaviour:
Your not helping here either. What I have heard here on this isnt helpful. What suggestions youve given have all had fundamental flaws, aswell as involving a cpu cost hike, and after that they've just been regurgitated.
Let me put it plain and simple
top
1) AFLobby
2) Spring site redesign
3) Darkstars
4) Lobby bots
5) AFServer design
6) Toolkit
7) NTai
bottom
Right now your all complainign and asking for new features and I havent seen much gained from the existing feature set, which begs the question, what use is there in implementing new features?
You have the best there is at the moment make do with it untill lua rolls around. I have limited resources,a nd right nwo the same 10 sentences over and over again arent helping they're incredibly demotivating, and you all know what happens when demotivation sets it, look at KAI/JCAI/OTAI/QAI/BAI.
a: NTai CPU usage is low
b: NTai CPU usage is high
c: It gets laggier as the games gets longer (unavoidable, all AIs will get slower as the game goes on)
NOBODY si suggesting a replacement for defence placement. Theyre simply sayign ti needs to eb solved. If you cotninue to do this then thigns wont get any better I assure you, defence placement will be just as bad in a year as it is now ebcause nobody ahs fofered suggestions on howto improve it.
All mentions of KAI defence placement will be ignored with a vengeance. NTai has no pathfinder and I'm not spending several months implementing and learning the intracacies of pathfinding.
Attack behaviour:
Your not helping here either. What I have heard here on this isnt helpful. What suggestions youve given have all had fundamental flaws, aswell as involving a cpu cost hike, and after that they've just been regurgitated.
Let me put it plain and simple
top
1) AFLobby
2) Spring site redesign
3) Darkstars
4) Lobby bots
5) AFServer design
6) Toolkit
7) NTai
bottom
Right now your all complainign and asking for new features and I havent seen much gained from the existing feature set, which begs the question, what use is there in implementing new features?
You have the best there is at the moment make do with it untill lua rolls around. I have limited resources,a nd right nwo the same 10 sentences over and over again arent helping they're incredibly demotivating, and you all know what happens when demotivation sets it, look at KAI/JCAI/OTAI/QAI/BAI.
Its called spacing. Raise your factory spacing values.3) building factories against the edge of the map so units cant get out of them
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
factory spacing value is 10, so clearly that isnt the issue..
im not trying to demotive you, im pointing out problems so you know whats wrong. i dont know enough about programming to suggest solutions.
cpu usage increases the more units and cons NTAI has. once it has about 30 cons and 200-300 units the lag is quite epic. the building placelent causes lag spikes. i dont know how to solve that. i mention the cpu usage because its many many times higher than the other AIs, like 4-5 KAI with full bases causes the same lag as an NTAI. not a problem for me on 3.6 ghz, but might be for some.
no need to replace defence placement, its fine for placing light anti raider defences and theres no fun fighting an AI that porcs in hard
this AI is currently the most promising which is why its getting attention, but it wouldnt be very helpful to list the good points as you already know, im trying to help.
you should take time out to play your AI with one of the configs so you understand these issues maybe
im not trying to demotive you, im pointing out problems so you know whats wrong. i dont know enough about programming to suggest solutions.
cpu usage increases the more units and cons NTAI has. once it has about 30 cons and 200-300 units the lag is quite epic. the building placelent causes lag spikes. i dont know how to solve that. i mention the cpu usage because its many many times higher than the other AIs, like 4-5 KAI with full bases causes the same lag as an NTAI. not a problem for me on 3.6 ghz, but might be for some.
no need to replace defence placement, its fine for placing light anti raider defences and theres no fun fighting an AI that porcs in hard
this AI is currently the most promising which is why its getting attention, but it wouldnt be very helpful to list the good points as you already know, im trying to help.
you should take time out to play your AI with one of the configs so you understand these issues maybe
I think i've found the reason why NTai slows down towards the end of the game. It would appear to be that whatever code is called by the units that have retreated back to a base position is causing the problem. These units never move again anyway so there is definitely an issue with this.
To test this I played on the same team as NTai and when the slow down occurred I sent all the retreated units into battle and there was a noticeable improvement. AF could you do a release with the retreat behaviour just commented out so I can test?
Also as regards high CPU usage the problem seems to be that towards the end of the game you have masses of construction units all looking for build sites in a crowded area. I have a config that works really well by not allowing this to happen (send construction units off to guard factories and don't build too many) this seems to really work, hopefully if i'm right about this retreat code we should have a kick ass AI with no slow downs and all AF has to do is comment out some code, so everyone wins
To test this I played on the same team as NTai and when the slow down occurred I sent all the retreated units into battle and there was a noticeable improvement. AF could you do a release with the retreat behaviour just commented out so I can test?
Also as regards high CPU usage the problem seems to be that towards the end of the game you have masses of construction units all looking for build sites in a crowded area. I have a config that works really well by not allowing this to happen (send construction units off to guard factories and don't build too many) this seems to really work, hopefully if i'm right about this retreat code we should have a kick ass AI with no slow downs and all AF has to do is comment out some code, so everyone wins

Remember why the code was put there to begin with?
UnitMoveFailed causing huge cpu spikes.
Look into this further. Is this just attack units? Look at the logs to try and gauge a pattern. Is it a neverending task loop for example?
I'm at a loss why a 2 year old tried and tested system suddenly started showing these horrendous problems, yet other AIs that use very similair systems dont suffer this problem.
AAI should have this problem. AAIs system is very similair to NTais, so much so they were originally identical, I just rewrote the AAI attack routine to work in my own AI and then spent a year twiddling it and tweaking.
UnitMoveFailed causing huge cpu spikes.
Look into this further. Is this just attack units? Look at the logs to try and gauge a pattern. Is it a neverending task loop for example?
I'm at a loss why a 2 year old tried and tested system suddenly started showing these horrendous problems, yet other AIs that use very similair systems dont suffer this problem.
AAI should have this problem. AAIs system is very similair to NTais, so much so they were originally identical, I just rewrote the AAI attack routine to work in my own AI and then spent a year twiddling it and tweaking.
I think its that the engine struggles with all the untis being sent back to same point, these units then just sit there, is there any trigger that you could respond to when a unit returns to full health? Could you then add that unit back into the attack groups?
What happens is the CPU usage with my test config (no rediculous levels of construction units) stays low but the latency (ping ms) goes sky high. If you could send me the code for the unitfailed stuff I'll try compare that to the other AI's and see if i can spot the problem.
What happens is the CPU usage with my test config (no rediculous levels of construction units) stays low but the latency (ping ms) goes sky high. If you could send me the code for the unitfailed stuff I'll try compare that to the other AI's and see if i can spot the problem.
To get an event for 100% health reached I'd have to manually store and test each unit at set itnervals to see if the health has risen and if it is now 100% where it wasnt in the last check.
The unit move failed code is very very very very simple.
The unit move failed code is very very very very simple.
Code: Select all
void Unitmovefailed(int unit){
Reatreat(unit);
}
well yes that is very very simple but isn't much use if you don't include the retreat method code
Also I think from that that seeing as you are sending all the units to the same place, some will fail, calling the unitmovefailed code again which will again attempt to send them to the same place which is probably the loop we are looking for...

Also I think from that that seeing as you are sending all the units to the same place, some will fail, calling the unitmovefailed code again which will again attempt to send them to the same place which is probably the loop we are looking for...
I'm sure you have the source code to the CActions class.
It calls Move() or MoveToStrike() I'm not sure which, and it returns a boolean. Theres no persistent memory, it calculates the necessary action, attempts to issue the order and then returns a success value. Nothing to do with commands being returned or tasks etc.
It calls Move() or MoveToStrike() I'm not sure which, and it returns a boolean. Theres no persistent memory, it calculates the necessary action, attempts to issue the order and then returns a success value. Nothing to do with commands being returned or tasks etc.
I suppose it would repeatedly add the position to the basepos array which might be an issue for static structures but its easily fixed by changing it from a vector to a set container.
Adding basepos to mobile units is generally not advisable.
In the mean time I've requested permission from tobi to put NTai in the svn. A full uptodate version of the source might be more useful than a slow trickle of code tags from me.
Adding basepos to mobile units is generally not advisable.
In the mean time I've requested permission from tobi to put NTai in the svn. A full uptodate version of the source might be more useful than a slow trickle of code tags from me.