TAI part 4 Command queues rules the roost - Page 2

TAI part 4 Command queues rules the roost

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Anonymous Joe
Posts: 21
Joined: 01 Nov 2004, 03:33

Post by Anonymous Joe »

Java is actually Dynamically compiled now, not interpreted. So its 'faster'...

still hogs memory.

Also lets see someone NOT use object oriented programing for a AI.
their code would become unmanageable in a short time.

most Windows, Linux, Mac and Console programs are written in C++.

A Lua engine would reside INSIDE the C++ core of the program, thus being VERY fast. (same concept as QuakeC...and Quake was a quick FPS)

Java has its whole own... Virtual Machine, which has all kinds of complex memory management and 'stuff' going on behind the scenes.

It would be somewhat easier for a Lua/Python/'insert scripting language here' integration as there are C++ libraries already set to be added into the C++ codebase of Spring (it IS coded in C++ right?)
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

Triaxx is now confused. I am not a very good programmer, unless I have something else I can modify to suit my needs. As such, without a basis, I have no idea what I'm doing.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Alantai is also being decombobulated by LUA talk, alantai wishes nto to hae to learn and implement a scripting language such as LUA. Alantai chose java with ti being extremely widespread and has already said he has considered perl and python and explained why they are still options.
Alantai wishes to say that Object orientated programming is necessary for his ideas and without it object orientated stuff will ahve to be built in behind the scenes thus not all of the command structure si included in the files as said which defeats the point.
Alantai also stresses that the entire AI is being constructed on top of a collection fo functions provided by the SY's using classes or as some people know them as objects.

Alantai wishes to work as quickly and efficiently as possible given the restraints imposed currently on his computer time and seeks help and guidance from others.

Alantai gets headaches from arguements like this over Java c++ and lua.

Alantai has said eh will use C++ for the first releases before moving to the proposed system.

Alantai needs reasons for cosnidering Lua

Alantai ahs not any experience of lua, and stresses the point.

Alantai has little time

Alantai tells traixx2, just go with the flow, be innovative, think your ideas through, send pseudo code and notes to me or liger, Alantai will sort it out so dont worry about your skills, your still contributing and your one of the biggest contributors I know, so keep it up.

Did I menion Java is latform independant? I want to know what interpreted languages could eb used, how easy they are to pick up in an instant, how quick can they be implemented so that you install the AI ont he fly and not spend time installing extra packages. I want people to show me examples and tell me why they think ti will work and why others will not. Start a new thread for this, "TAI Scriting engine propositions" it will be called.


Right now I have a few queries to sort out before I start anything code wise. Triaxx2 send me everythign you have writtena nd any thoughts as to your own AI. I will use your thoughts and my thoughts to create a very basic AI just to proove that it can eb dne with what has been implemented so far. Send them to liger and anyone else with thoughts for that, he will pass them on to me and look at them himself no dout. You dont mind liger?

Now here, I want this to go smoothly and quickly, as quickly as possible, when I ask for a volunteer its first come first serve and no faffing about choosing, you post and thats that, I will not have the fiasco that happened witht he logo thread and I will not spend my time debating a small feature, if its that small we leave it to the end. You do not badger the SY's , they have their own AI considerations and need time to test beta 0.1 afteral what use is an AI without a game to use it with.
User avatar
BlackLiger
Posts: 1371
Joined: 05 Oct 2004, 21:58

Post by BlackLiger »

Alantai, all 3rd generation programming languages are plactform independant, apart from visual basic, maybe. Or visual C++ (made by microstuffed :P) but all the others r plactform independant, You just need the right compiler/interpretor/translator/linker. And don't contradict me, im the 1 on the a level computing course :P
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

I will do that AF. And if you need any grunt work done, I've got little else going just at the moment, so with my stability issues worked out, I'm free to help.
JeeZ
Site Admin
Posts: 62
Joined: 19 Oct 2004, 16:12

Post by JeeZ »

I suggest using the Super Mega AI Language. It is really cool and the code look something like this:

Code: Select all

If (there are some really nasty enemy units around) {
   Go find really nasty enemy units and kill them()
   Think of something smart to do next()
}
:wink:
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Semi-psuedo code of what jeez said, no idea of whether or not it will work :P

Code: Select all

enemyUnitsId[10];
const UnitDef* ud;
int totalattackpower=0, armour;

callback->GetEnemyUnits(&enemyUnitsId, unitInfo.coords, 10);

for(int i=0;i<10;i++)
{
    ud=callback->GetUnitDef(enemyUnitsId[10]);
    totalattackpower+=ud->(puttagforweapondamagehere);
}

ud=callback->GetUnitDef(unitInfo.id);
armour=ud->(puttagforarmourhere);

if(totalattackpower>armour)
{
    command c;
    c.id=CMD_ATTACK;
    c.params=enemyUnitsId[0];
    callback.GiveOrder(UnitInfo.id, &c);
}
else
{
    yettobedefinedfunctions.advance();
}
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Jeez does hat scripting language support hypothetical questions?


ideas people post hem no matter how short!
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

I would hope that the AI effects that JeeZ's code would create would be a natural emergent effect of the AI itself.
Post Reply

Return to “General Discussion”