OTAI

OTAI

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

Moderators: hoijui, Moderators

Post Reply
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

OTAI

Post by Veylon »

Here's an AI that mostly works like the Orignal TA AI.
It Scouts, builds, attacks (thought not very well) and avoids nanostall.

Get it here: http://www.geocities.com/veylon_ii/TASpring/OTAI.zip

BTW, it does still use that dang StrDat workaround structure, so you'll have to recompile if you don't want it to do that. Instructions are in the readme file.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

it does not work

it says incorrect global ai version

PS: i renamed it too test.dll

Edit:

Also does not work via TASclient
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

i didnt get it to work eighter :(
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

GEOCITIES!!! AHK AHK KILL KILL KILL!!!!!!

no really I'll have to take a look at your source and get rid of the work around.

Also this has been compiled for spring0.65b2, so it wont work with any fo th binaries me buggi or zaphod have released, and the only AI vs OTAI you cna do is with the NTAIx.dll in NTAI0.25 + goodies.

hmmm, things like this:

Code: Select all

void CGlobalAI::UnitCreated(int unit)
{
   	#ifdef DOLOGGING
    LogFile << "CGlobalAI::UnitCreated("  << unit << ")";
    LogFile << ": " << callback->GetUnitDef(unit)->humanName.c_str() << endl;
    #endif
	myUnits.insert(unit);
	UnitTypeInfo.find(callback->GetUnitDef(unit)->id)->second.Count++;
//	char c[200];
//	sprintf(c, "New %s Created", callback->GetUnitDef(unit)->name.c_str());
//	callback->SendTextMsg(c, 0);
	if(callback->GetUnitDef(unit)->extractsMetal > 0.0f)
        CMex(unit, false);
    _UnitInfo UI(unit, callback->GetUnitDef(unit)->id, callback->GetCurrentFrame());
    UI.Damage = -1;
    UI.Mission = STAT_IDLE;
    UI.Target = -1;
    UnitInfo.insert(map<int, _UnitInfo>::value_type(unit, UI));
}
why so many callback->GetUnitDef(unit)->id type calls? Why not just define a const UnitDef* ud = ... type variable and use that like everybody else does.
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Most of my functions that deal extensively with a unit do use a pointer to unit definition.
That one, though, that one needed one badly.
BTW, I didn't know that everyone wasn't using that latest version of TASpring. I wrote it for, and it worked with, 0.65b1.
Should I not upgrade to 0.65b2 yet, or what else can I do make it more compatable?

Getting rid of the workaround shouldn't be to hard, since I released the code with it not activated (that's why you don't see the StrDat or std::string types being used explicitly).

edit:
I'll make and put up a few screenshots and demos of the AI in action so you can actually see it doing something.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

You might as well wait for the next release now, it's close.
Demos will probably have sync errors, at least if any game code is changed between releases.
The upcoming release has an somewhat extendable (or is it extendible? :| ) interface, so you won't have to release an AI with every new spring version.
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

OK. I forgot to bring them, anyway...

A better Interface would be very nice.
Post Reply

Return to “AI”