NTai Toolkit 0.3

NTai Toolkit 0.3

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

Moderators: hoijui, Moderators

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

NTai Toolkit 0.3

Post by AF »

Image

Point and click skirmish AI config builder, Build your ideal custom AI battleplan and test it out, Designed for use by total noobs

No coding/programming required
No textediting required

More Information here

Any feedback or questions would be greatly appreciated.
Last edited by AF on 23 Oct 2009, 22:57, edited 17 times in total.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

weee I can make a SWTA AI that spams barracks and wookies!
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Here's what happens when I try to open the XTA_BT2.tdf default config:

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Empty path name is not legal.
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at NTaiToolkit.CBuildtree.Load(String TDFfile)
   at NTaiToolkit.Form1.linkLabel1_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e)
   at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
   at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Label.WndProc(Message& m)
   at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
NTaiToolkit
    Assembly Version: 1.0.2547.39319
    Win32 Version: 1.0.2547.39319
    CodeBase: file:///C:/Program%20Files/TASpring/AI/NTaiToolkit.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
edit: And there's a similar error in game with not being able to open a config file. This is with XTA 8.1
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Does anybody else get this?

And lindir does it give you break or continue options? if so try pressing continue...
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

Yes, you can press continue or break, but it won't work if you press continue, the programm works without this "bug", it's just because you tried to open the file in the wrong directory.

I would supply screenshots to describe what I mean ,but I didn't know about the spam protection, so no screenshots.

Well I'll try to desrcibe it another way. Do NOT open the Mod "config" located in AI/NTAI/configs.

Instead go to AI/NTAI and open the "config" there.

Worked fine for me.

hope this helps.
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

That allows me to successfully open up the config file, but I still get this error whenever I run a globalai test of NTai:

Code: Select all

Using script GlobalAI test (NTai.dll)
Map: Small Supreme Battlefield.smf
Mod: "XTA v8.1" from XTAPE.sd7
Number of damage types: 5
TA Spring 0.74b1
LUA: Loaded GUI interface
Player Lindir_The_Green joined as 0
AI\Bot-libs\NTai.dll has C++ interface
AI has enabled cheating.
GlobalAI1: error in Global InitAI, cannot continue
GlobalAI1: boost::spirit::parser_error
GlobalAI1: Error :: InitAI() in XE9.3 failed, please notify AF at once
GlobalAI1: Error :: www.darkstars.co.uk
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

I don't know about this one... sorry. I've to get an overview about all those options in the toolkit first before I even try to set up a config.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

its trying to parse a tdf file that malformed in some way

open up the config files in a texteditor and check for syntax errors.

theres an error in one version that caused this but its been fixed in 0.2b. 0.2a was only available for 4 minutes.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Ai never builds builders.

Log message from when it should do it
[02:35] < Frame: 4679 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[02:35] < Frame: 4679 >Given the go ahead :: armcv
[02:35] < Frame: 4679 >Given the go ahead :: armbeaver
[02:35] < Frame: 4679 >Given the go ahead :: armmlv
if(targ == string("")) for b_builder
And the error Lindir was talking about happens if you don't have two NTais in game, not sure why.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

use amrcv armmlv or armbeaver instead for the moment
Hannes
Posts: 7
Joined: 02 Jul 2006, 21:07

Post by Hannes »

I wrote a simple buildtree with the toolkit. When I play a game with 2 NTAI's (EE) the first AI crashes and the second keeps giving errors whenever it reads a "build hub" command. Maybe Im not doing everything correctly?

Here's the infolog:
Map: Castles.smf
Mod: "Expand_and_Exterminate_v_0.171.sd7" from Expand_and_Exterminate_v_0.171.sd7
Number of damage types: 15
TA Spring 0.74b1
Player Player joined as 0
ai\bot-libs\NTai.dll has C++ interface
AI has enabled cheating.
GlobalAI1: error in Global InitAI, cannot continue
GlobalAI1: boost::spirit::parser_error
ai\bot-libs\NTai.dll has C++ interface
AI has enabled cheating.
GlobalAI2: [00:04]error :: a value :: b_hub :: was parsed in :: commander :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair or b_mex
GlobalAI2: [00:04]error :: a value :: b_hub :: was parsed in :: commander :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair or b_mex
GlobalAI1: Error :: InitAI() in XE9.3 failed, please notify AF at once
GlobalAI1: Error :: http://www.darkstars.co.uk
Player paused the game
Player unpaused the game
GlobalAI2: [06:04]error :: a value :: b_hub :: was parsed in :: commander :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair or b_mex
GlobalAI2: [06:04]error :: a value :: b_hub :: was parsed in :: commander :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair or b_mex
Kamir I: Can't reach destination!
User exited
Path cache hits 44 37%
Path cache hits 17 5%
And btw a search-for-unit-in-the-massive-unitlist function and filters (eg. construction units, air units, submarines, milatary untis etc.) would be really cool, as it takes a lot of hard work searching for a unit in the unit-list.
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

Weird, save does not work 100% anymore... I was able to make "Core" build mexes and facilitys but arm doesn't build anything (even thought I've checked the buildlist for the arm commander and pressed save.

After I pressed save, the list for the arm commander is gone (the checkbox is unchecked again).

--------------------

Also, It would be cool if you could edit build options for each building, like the vehicle facility, right now, my commander keeps building them.

A suggestion would be that you could set how much buildings he is allowed to built, maybe like that:

1. Factory: build at start
2. Factory: build when available >5000 & energy >5000
3. Factory: build when production >200 metal & 1000 energy
.
.
.
(should be extensible by the user)

Kinda like that (if this is possible and not too much work).

So basicially you have a drop down menu with "build at start" and "build when", then for "build when" there is another drop down menu in which you can choose to build when a specific "number" of resources is in storage or when you produce a specific "number" of resources.

The same would maybe work for vehicle production, so at first he may not use 3 factorys at once, but when a specific number of resources is available, he will use all three at once (and so on).

Of course this is just a plain example I've made up. (there may be some problems if you add an insane huge number of facilitys to build, but there's no room left etc...)

I also think that the idea about Filters is pretty good, saves a good amount of time for the end user if he searches units/facilitys.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You know there is a set of options that does that, look in the untis tab.

Also you can set arm and core commanders to build different things. Just create a new tasklist and call it say "armcommander" then assign it.

And a search box is a good idea, I'll get round to it soon.


Also people, look at the logfiles NTai generates for clues. If you ahve any message involving a unit and unfeasable that then says the task skipped, it means it hasnt the resources. Make ti build storage and be careful with economies.

You might also want to uncheck the antistall option, although doing so means its all upto you to stop NTais stored resources hiting zero.

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

Post by AF »

I deally you would check neverantistall on all your lvl 1 basic resources like mexes windgens and solars.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

And could someone who has the spirit parser errors zip up their entire NTai folder and email me it? Look in my profile for the email.
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

doooohh, sorry AF for stealing your time, so if I understand right you can do practial all things I've said?
Producing 1 vehicle factory if energy income 20 -40, the second factory when energy 100-120 for example.

To prevent the AI from building them again and again while the income is in the set range I should check "Solobuild"?

Anyway, I still have this weird "Save" bug, I already deleted the config files for XTA 8.1 and started NTAI again with it, but still, my arm commander list is unchecked even if I checked and saved before.
-----

Still my Suggestion stays about adding Metal income and available Resources (for Metal & Energy) to the Edit Options.

My thoughts behind this is, that it wouldn't be very good if you have 0 energy and the ai starts building 5 other buildings because its income is >100.

So you could kinda prevent building buildings when the ai is at war (and needs resources to build more units)

Again I don't know if anything like that is already implented (because there is no "real" Manual *hint*)

edit: ok somehow it saved the list now , still sometimes it does not (I chance the "Version" variable from 0.1 to 0.2 but it changes right back after saving, closing and reopening the config.

I think I've found a bug, It seems that the AI in the first position is never building anything. Tested on 2 Maps, with three ai's ingame: Core - Arm - Core. Also tested it like that: Arm - Core - Arm, still the FIRST AI never build anything. Note that I was in Spectator mode.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The first AI crashes before it gets to create the command structures that make the AI tick. As a result they arent called in order to prevent a hard crash.

The other AIs however dont get this bug and proceed at half steam, but they'd work better if the first AI was operational. The first AI has responsibilities the others dont, such as maintaining shared data, which is essential for things like threatmatrixes, without which it wont attack.

Please zip upon springfolder/AI/NTai and email me at tarendai@gmail.com so i can test and get rid of the bug because so far I dont have the necessary files all together to debug it, just tidbits of some configs people have or a core config file but not everything all together.

And how would ppl feel about an upload button that uploaded a tasklist to a server and then allowed you to download other peoples tasklists?



One very useful concept to have is to mentally replace every mention of tasklists with the words 'build orders', the only difference beignt hat tasklists can have things that arent todo with building in them.
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

I've send an email with my current NTAI Folder to you
And how would ppl feel about an upload button that uploaded a tasklist to a server and then allowed you to download other peoples tasklists?
Would be pretty neat Idea, but would it be also possible to add a "upload config" button, because I think real good and advanced configs may take some time.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Thanks, I also got one from nemo, and immediatly one flaw that I spotted was a missing bracket in the learnign files.

Go into your files in the learn folder with a text editor and add a bracket on the end and it should fix the error.
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

small error, huge impact ;)

I can just guess how hard it is to keep track of things like that If you start to write programs things like that (I've written some small and fairly easy console programs in c#/c++, but that's just peanuts in comparison to what you do)

I hope "our" Files help you to "hunt" down some bugs.
Post Reply

Return to “AI”