NTAI untested thread (0.28 BETA 9, 3rd december)

NTAI untested thread (0.28 BETA 9, 3rd december)

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

NTAI untested thread (0.28 BETA 9, 3rd december)

Post by AF »

I create this thread so i can release continuos updates.

These versions of NTAI are not thoroughly tested, they are released without major playtesting and they're done as regular as I can do them.

If you want to discuss NTAI in general start another thread. If you've found a bug or a problem keep it here.

NTAI 0.28 b1

http://www.fileuniverse.com/?p=showitem&ID=1813

EDIT:: Current version is0.28 Beta 9

Changelog:
-Even more extensive exception handling and error catching
-The building placement has a quickfix so it wotn build factories with a cliff blocking the entry and exits
-Exceptions show up as yellow in the log now.
- Added a .crash command that crashes spring on demand
- Minor balancing of the commanders build tree.
- A quick change to the way NTAI itneracts with cains class, (mexes are registered on unitcreated not unitfinished), to help prevent mexes being planned on similair spots.
- I have turned the Aircraft plant into an experiment by making ti load its task list from a file.
- Fixed a few bugs with metal maker handling.
- Added green markers to show that the AI has actually managed to get an enemy untis position (never seen exept in circumstances where the AI cant use the information)

I'll edit this post in a few minutes once I've uploaded the source.
Last edited by AF on 03 Dec 2005, 18:25, edited 3 times in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Oh I forgot,

It attempts to laod a list of mapnames from a file called BadMap.txt, and if the current map is the same name as one of those then the AI refuses to continue.

Any files NTAI laods from are in sd7 archives laoded by the spring engine so they can be included with mods & maps.

I've also changed logging somewhat so that html logs are around 70% smaller, and increased contrast so red messages are a lot easier to read.

NTAI 0.28b1 Source
User avatar
AlienDNA
Posts: 25
Joined: 19 Sep 2005, 13:23

Post by AlienDNA »

I tried this version on 2 maps (castles and 2 valleys), and in both cases it just built a few metal extractors, a solar-collector, and a factory (first time a kbot lab, second time aircraft plant), and that was it. No building, commander stopped, nothing. It just went to a halt. I tried giving him buildings to see if he needed anything, but to no avail.
LordCerber
Posts: 1
Joined: 14 Nov 2005, 13:41

Post by LordCerber »

The same problem on other maps as well.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Good, I've fixed that problem.

Download +Source

Remember these havent been tested 100%, I've made the changes and moved on to the next change. Go for 0.27b if you want a 100% stable release.

B2 changelog

Building algorithm modification fixed.
Commander build tree modified, not as much energy built more metal built.
Minor tweaks to the attack system, removal of unused variables, a bit of re-arranging and more checks added.
The skeleton support needed for taunting. Taunting isnt in there yet but Targ Collective is working on it.
A change to CBuild() and FBuild(), if an order is rejected by the engine ti tries a second attempt then logs an error emssage upon 2 successive failures.
User avatar
sp2danny72
Posts: 60
Joined: 09 Jan 2005, 04:52

Post by sp2danny72 »

in this latest build, the commander stand around doing nothing...
User avatar
Kuroneko
Posts: 483
Joined: 03 Jan 2005, 05:32

Post by Kuroneko »

sp2danny72 wrote:in this latest build, the commander stand around doing nothing...
mine built a mex then stood around
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

me silly, me did not playtest liek I said I wouldnt.

So me removed quickfix build algorithm and me do the following:

Downlaod

Changelog from NTAI 0.28 B2

- Added D-gunning, anything that has a special weapon such as a d-gun will fire ti if attacked. Code derived from work by Veylon.
- Silos will now stockpile missiles.
- Building algorithm ahs returned to normal, no more quickfix experiments after I couldnt get it back to the quickfix version that worked.
- Attack code now calls GetEnemyUnits and not GetEnemyUnitsInLOSAndRadar.
- A tweak to the loading of TCORAP.txt and a logging of an error if it fails.
User avatar
sp2danny72
Posts: 60
Joined: 09 Jan 2005, 04:52

Post by sp2danny72 »

Well, it did try to d-gun me.
But it didnt lead the target, so it was quite ineffective. (But a start)
And it still didnt build anything...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Well someone told em the fix I did in b2, had bene udnone by soemthign i did immediatly before compile. I can see how I'd do the firing infront of thing though....

I'll post it tomorrow, I ahve a lto of ICT coursework todo so I will ahve to turn down how much i do this week.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

HOW THE HELL DID U GET IT TO DGUN? Awesome! and the stockpiling of missiles? how does it determine when it should launch them? when a scout has been in visual range of the silo? or when its test fired a few cruise missiles? if it is unable to see completed antinuke silos with a few peepers?
User avatar
AlienDNA
Posts: 25
Joined: 19 Sep 2005, 13:23

Post by AlienDNA »

The AI indeed doesn't do anything yet. He does D-gun me, but the game crashed after he actually hit anything with his d-gun (2 jeffy's). It just stands around. Too bad we can't test any features this way... :)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Atm I dont think ti does anythign with its stockpiled misiles save fire antinukes.

What map are you playing it on and I take it it be the latest version? No AILog.htm? Or Infolog.txt? Post logs people if ti crashes, or I'll be expectignv ery detailed replies. For all you knwo NTAI doesnt like the map and I am not aware fo it thus cant fix it....

NTAI 0.28 b4

download here

NTAI 0.28 b4 changelog

- The history array in Factor class is set to be identical to the hotspot array in cains metal class a startup so buildigns arent placed on mex spots.
- D-Gunning has been changed so it's special weapons and not just commander D-Guns.
- D-Gunning has been modified so that a unit pauses its commands to d-gun instead of cancelling tis current command, which can mean an unbuilt building doing nothing while the builder starts the next task
- Updates to gui.h and gui.cpp
- New Draw function in Planning that takes an ARGB structure with colour values.
- Random code cleanups.
User avatar
sp2danny72
Posts: 60
Joined: 09 Jan 2005, 04:52

Post by sp2danny72 »

Still same problem...
Commander stands around and does nothing

Here is AILog, infolog and sfd
http://s11.yousendit.com/d.aspx?id=1G2V ... 17P9JTWOVQ
link valid one week

Also, have you included the right version for download?
File properties says 0.27, and so does AIlog
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

I have the same problem, and i already tried ntai0.28b4.
Commander in some maps builds a mex but it doesnt do anything in most maps.
I tried like about 5 diferent maps or so
User avatar
Kuroneko
Posts: 483
Joined: 03 Jan 2005, 05:32

Post by Kuroneko »

Yeah, I did notice something in the infolog which I haven't noticed before...

Code: Select all

Path cache hits 0 -1%
Path cache hits 0 -1%
AILog:
http://kuroneko.gotdns.com:27018/ta/AI/AILog.htm

Code: Select all

[00:00] 	Planning::feasable
[00:00] 	CBuild()
[00:00] 	*Unit name here*
[00:00] 	Build location collision found!
over and over
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I've addressed the problem and playtested and then I overhauled a large section o code to fit a more unified task handling system.

When I then playtested I got a big slowdown as construction tasks where given one after another regardles sofwether the rpevious one ahd even started yet.

So i went to fix it, but that was a minut ro two ago so i've sent it to masse to test, then I'll release b5 in the next hour if all is well.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Image

Fixed, but masse reported that at some point the whole thing stopping churnign away and ground to a halt for no reason.
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Well, the AI only builds one mex and quits...could there be something wrong on my end?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm well here's beta 5. My last playtest the commander built a mex then stopped. But if you took control and made it build a factory then it would continue as normal. I made changes since that to try and fix an exception that had appeared but havent tested it again. Eitherway I've made a lot of changes with structure and added new classes.


http://www.fileuniverse.com/?p=showitem&ID=1868

Changelog0.28b5

- Building algorithm engine call has been reverted to the version in 0.27/
- Task Tunit and UGroup class have been added, and any systems using similair classes now derive.
- Code redundancies removed.
- Udar and Tunit classes merged.
- Logging class can now log in plaintext optionally.
- Numerous re-arrangements to suit the new changes.
- cpersona structure added. Not used yet though
- Created Register class, not used yet but will handle Tunit objects in the future.

NTAI will build, but it is in the middle of a re-arrangement of sorts
and thus will not behave, it may start throwing cookies at you,
be warned. It will build though, just not always to the same
extent. This is a beta afterall

Future support for NTAI x is now possible through the Tunit
class and Task classes. I shall work towards unifying the
numerous task systems and classes to work around a single
definition of Tunit and UGroup. Then I can derive Tunit from
T_Agent, making units themselves fully fledged agents, and
thus capable of having logic such as that discussed in the
NTAI X thread.

I shall add more functions to the Ugroup and Tunit classes,
such as AddTask(Task* t), giving units the chance to
disobey.

I shall also take inspiration from OTAI for the construction
system. Then I will use that as a stepping stone onto what
I had planned.

Very soon NTAI will become remarkably similair to OTAI in
its workings as it passes through its paths into the NTAI X
route.
Post Reply

Return to “AI”