NTai Toolkit 0.3 - Page 6

NTai Toolkit 0.3

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

Moderators: hoijui, Moderators

User avatar
Fat Zombie
Posts: 61
Joined: 31 May 2006, 19:16

Post by Fat Zombie »

tombom wrote:
Fat Zombie wrote:Hello there.

I'm not experienced at all with any sort of AI config, but I downloaded this and tried it in order to create an AI config for my fave mod, EE. However!
I seem to be having a problem at the first step. The "start the mod with the config" step. In so much that as soon as the game starts, it crashes to desktop saying "incorrect AI dll" and pointing to the NTai.dll file.

Could someone please tell me what obvious thing I am not doing; also, since you are more experienced, could anyone provide a decent EE AI config? Thank you very much.
The current version of NTai that you can download hasn't been compiled for 0.74b3 or whatever version we're on. AF is working on some more improvements and stuff before he releases the next version.

This is a somewhat working config.
Oh, thanks. WEll, if it doesn't work i'll have to wait then. Thanks for saying!

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

Post by AF »

http://spring.unknown-files.net/file/22 ... _0.24_GUI/

There's a version of the toolkit gui. I've corrected most bugs, namely the ones I remember, I've made ruleinterpolation on/offable (if turned on NTai inserts b_rule_extreme_nofact inbetween every task item once loaded)(it was turned on by default in previous versions).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm, tryign to compile NTai on ym old computer (mingw32 doesnt work with Vista) gives me an error with the followign code:

Code: Select all

template<typename T>
	void UseArray(const T* a,int size){
	for(int i = 0; i < size; i++){
		std::stringstream stream;
		stream << a[i];
		float v;
		stream >> v;
		SetValuebyIndex(i,v);
	}
}

Code: Select all

no match for 'operator>>' in 'stream >> v'
Process terminated with status 1 (0 minutes, 11 seconds)
any ideas?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

ahk there's no cheat interface in the C interface..... And spring wont compile in VS 2005 so I cant test NTai on this PC at all.
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

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

Post by AF »

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

Post by AF »

Download NTai XE9.5RC1 here
Download Toolkit 0.24 here

one word of advice, try to keep to nonwater maps, as NTai wont build on water atm.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

I've only just started looking at this and it looks good, only problem is for me builders/factories seem to randomly stop executing the task list(s) and just sit there. In the case of the commander it adds the ghost image of the next item to build and has the arrow on from its location to the build site but it never proceeds to actually build it.

I've turned antistall off in the global settings tab and clicked the never antistall on the unit editor but that's made no difference. There doesn't seem to be any information on the problem in the logs I get a:-

[00:24] < Frame: 722 >Error::Cbuild G->OrderRouter->GiveOrder(tc)== true :: armmex
[00:24] < Frame: 722 >Error::Cbuild wiping and creaiing the plan :: armmex

for every building that's placed but this "Error" doesn't seem to be the cause of the problem of builders just sitting there because it occurs for every building
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Thats a typo it shouldnt say Error: there.

And if you get an arrow then you shouldnt be blaming antistall. Arrows appear for planned items and item plans dont get created if antistall algorithms say no.

Alos

mod, map faction, etc
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

mod: BA 4.61
side: Core

I've looked into it as much as i can and i'm afraid i can't find any pattern to it at all. I realise this is pretty un helpful. I'll try the same config on some other mods and see if the same occurs...
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

OK tried it on XTA 8.1 and it crashed while trying to create the config files (tried deleting the ones that were there first as well)

Absolute Annihilation didn't populate the units list so couldn't try that.

Absolute Annihilation(H) version did populate the unit list and gave the same problem as balanced annihilation.

I've also tried specifying the building to build exactly ie ARMSOLAR instead of b_power and that gave another problem which may or may not be related. The building appears as a planned item imediately exactly where the commander is stood and the commander never seems to move out of the way to build it... Sorry can't be more helpful, let me know if you want any more info or files sending over.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Lindir said to me that he had a similair issue, however I'm unable to figure out why, because the moving out the way behaviour isn't an NTai behaviour its a spring behaviour.

Its extremely awkward to debug NTai at the moment as I would need to compile it in visual studio 2003 on my old PC using VNC to control it then run spring(running spring disconnects the VNC client), and debug in a visual studi 2003 build of spring.

Or do the same on this PC with visual studio 2005 but I cant because spring wont compile in Visual studio 2005.

Or the same with mingw32, but mingw32 doesnt work under Vista and I dont know howto debug using it.

And could you give me logs DJ? Dont post the full logs in this thread just link to them.

And officially I wont support Absolute Annihilation or any other mod or variant based off of versions of AA prior to Balanced Annhiilation. AA is outdated and shall be treated as such, and interferes with Balanced Annihilation configs by sharing the "AA" config tag. Its impossible to have seperate BA and AA configs at the moment unless the makers f BA change their tag in mod_info.tdf to "BA".

And when the comamnder issue appears, try to take control and tell me if:

"NTai is trying to buld there and the com wont move"

OR

"NTai has a plan there but it isnt trying to build"

This is done by selecting the comamnder, pressing shift and seeing if it has a build order or if its just NTai displaying the plan.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Absolute Annihilation didn't populate the units list so couldn't try that.
And what do you mean by this? =s, please ellaborate!
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

sorry, I started the game with NTAI to create the config file to edit. Once i'd done that I opened the config file and the units tab had no units in it. Pretty sure I'm doing it correctly as the same proceedure works with the other mods.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

OK just tested the commander problem as you asked, it would appear that whilst NTAI is planning the next item it never gets added to the commanders build queue. I tested this by being on the same team as NTAI and when the commander stalled i shift added another building. The commander went straight to build my added building. NTAI did appear to recognise the fact the new building had been added as the arrow drawn changed direction.

If this isn't what you were after let me know. Will email you the log file.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Yah I'd like ti fi you sent me the whole config:

/NTai/AA.tdf (the config root file that toolkit uses)
/NTai/configs/AA.tdf (the file NTai reads to figure out what todo)
/NTai/learn/AA.tdf (The file with the learning values and unitnames etc.)

I've made some notes on what you've already sent em via email and emailed you back, some points I will raise now, some I need more information about.


First of all

is_builder is_factory type keywords

These became obsolete and unsupported as on XE9.5RC1, the new task system simply doesnt require them as it is a totally new design. Toolkit wont let you add these keywords as I removed them, however, old versions fo toolkit will let youa dd these keywords, and new versions of toolkit will ignore these, and so you need to remove them manually.

TDF Junk

Code: Select all

[-] < Frame: 0 >Junk in buffer :=b_power,b_power,b_mex,b_mex,b_mex,b_factory,b_power,b_power;
I found this message inside the log DJ sent me and this infers a syntax error in one of the config TDF files. I do not have a copy of them however and so I cant figure out the problem.

While I cant easily debug NTai, I can fix, debug, compile and release new versions of the toolkit program. (well technically I cant do that as toolkits on my ipod nano and its gone missing).

The reason the arrow moved when you manually buitl the item is due to the way the planning system works. I found that the location a unit is told to build something at != the location the unit being built is said to be located at. I presume then that this is because one uses the centre of the unit and the other the corner, and that there's some twiddling of the value due to underlying grids and the blocking map. I cant really be sure of this all, so to fix this I made the plan movable by a certain radius.

I may also ntoe that to save cpu tiem and spread out unitIdle calls I staggered the next task start point by making units wait a random amount of time between tasks. This prevents them lagging the game heavily if 4 or 5 units skip a group of 3 or 40 tasks in succesion, especially if each is due to build palcement problems such as them being in the middle of a huge base and thus spawning lots of search threads.

This solution ahd a side effect in that it sometimes made factories wait long enough that they started the closing sequence. I tried to reduce this value however before compiling the version I uploaded to UF so if its a problem for certain mod tell me as I test in EE not XTA or BA as thats the most complete config I have available atm. That config is bundled with the XE9.5RC1 download.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

OK found a few things out, sent you them via email but i'll put them here as well:-

1) the tdf error you showed is caused by having a task list with no name.
2) I've only ever used the latest version of the toolkit, i only started looking at this when you released the last version so think that the is_builder stuff may still be in the version you released...
3)yes the factory closing problem you mentioned sounds very plausible, I'm playing in BA 4.61. I am getting very high CPU usage which is a bit awkward considering i have a pc made of junk to work on...
4) The commander pausing / specif building problems (Lindirs report) are both caused by NTai trying to place buildings where they can't be built. NTai never seems to recover from this fact.

I can send you the config file i've made for BA but its really really simple as i stopped working on it when i discovered these problems. -let me know
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

OK since my iPod nano with my toolkit source folder has yet to turn up I've decided to shift to AFLobby integration, for a combined build order database, config generator, mod viewer, tech tree explorer.

This means:

Unit pic Images
Unit data
Unit filtering
Drag and drop build orders
Sharing build orders
Build order contexts

In the last item it means I'll shfit how NTai works and instead give it a strategy, to which build orders are assigned, and there'll be startup strategies, and mid game, and late game, and strategies will have primary strategies and secondary, which should give NTai some objectional focus rather than sprawling out and following rule sets.

This also means you could be contributing to a config that AFLobby autogenerates by autodownloading strategies people share, and allowing you to setup different types of strategies.

This also means you can flag strategies by difficulty and type, like "Hard Air type AI" or "Medium Balanced" or "Very hard fast attack", and then because its integrated with the lobby you can say what type each AI you add should be, whereas the other clients are limited by the simple "NTai.dll, QAI.dll, RAI.dll etc...." or "NTai.so, QAI.so, RAI.so etc...." .

This change also means I have a future path for AI automation by letting the AI catalog enemy build orders and present them to the player at a later date for organising and sharing.

This also means it will take time. AFLobby is a large project that seems intent on eating away at tme and resources.

Apologies for any spelling errors, as this post was made in Unviersity (IE6)
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

Sounds wicked

:lol:
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

I'm gonna have to yet again completely redo the config.

Oh well, hopefully it'll play better with less work than the previous versions.
Post Reply

Return to “AI”