Page 1 of 2

SAI 0.15 - (with Source)

Posted: 13 Mar 2006, 21:22
by Spectre
just played around with Codeblocks and made a very stupid AI... just some hardcoded behaviour... but I´d like to know if this works on other computers...

I call it SAI ;) (0.15 - source included)
http://fileuniverse.com/?p=showitem&ID=2818 (with Source)


AA 1.44 / XTA supported
(but tweaked for xta)

Posted: 13 Mar 2006, 23:37
by hrmph
Yep it works, its a start ;)

Posted: 14 Mar 2006, 17:38
by Spectre
Hmm does anyone know the cause of the "NO RTTI DATA" error?


edit: GR.... I hate typos... I found my mistake

Posted: 15 Mar 2006, 17:16
by Spectre
finally got krogothe's metalclass to work...
still only XTAv66... but it gives OTAI/AAI a good fight on most maps ;)

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

... forgot to include the metalmap save folder... the metalclass crashes without it :(

Posted: 15 Mar 2006, 18:00
by SeanHeron
How about the source :) ?

Posted: 15 Mar 2006, 18:08
by Spectre
you dont want to see it right now ;) Im learning C++ with this..... I will release the source when I think its going to help someone

edit: I mean when I cleaned it up a bit :oops:

Posted: 15 Mar 2006, 20:14
by AF
hmm, source code can help people in the most unusual ways, regardless of their skills of programming. Thats oen thign some people fail to grasp *ahem* and it's also why I try to release source code when I can. I reccomend you do the same and who knows, you may end up with an inbox of code changes to be applied.

Posted: 16 Mar 2006, 02:04
by Lindir The Green
Well I would really like to see the source code, because then I would get an idea of what code is neccesary to create an AI.

All of the advanced AIs were too confusing for me :(

Posted: 16 Mar 2006, 13:38
by Spectre
heh I had the same problem.. but somehow I found it out by myself... I´ll post the source in 2-3 hours..
http://fileuniverse.com/?p=showitem&ID=2709 <- SAI 0.05 with source

Posted: 16 Mar 2006, 17:28
by krogothe
Lindir The Green wrote:Well I would really like to see the source code, because then I would get an idea of what code is neccesary to create an AI.

All of the advanced AIs were too confusing for me :(
Its been the same for all of us... The "advanced" AIs are not that advanced once you get used to reading c++ and AI code. Practice makes perfect!

Posted: 16 Mar 2006, 19:51
by Veylon
Very true!

How advanced were any of these AI's six months ago? And now all of them are better than most AI's that I've seen in RTS games, especially considering how much flexibility they must have for different mods and such.

Posted: 16 Mar 2006, 20:14
by krogothe
I think that not having an "easy" guide is actually a good thing, since youll only get making your AI if you have lots of dedication, which is seriously needed to make it work. A lot of people have started AIs and lost interest, since it is a daunting task!
Right now im having some problems where doubling the amount of data slows a certain function down a hundred fold, which is insane(o^50???), as well as a 100% cpu freeze right on the first minutes. I have no idea where the problem lies, and my debugging never worked, so i have to put a fine comb through the code till i find the problem.
Stuff like that happens all the time, so its really easy to simply give up! If you are gonna make an AI id recommend you try something completely new in some area or become very competitive/patient, those things help with motivation at hard times. I almost stopped working at KAI, but i had a great idea for the attack system, and my motivation got fueled again!
Anyhow, its always good to have new people making AIs, so give it a go!

Posted: 16 Mar 2006, 20:28
by AF
I get carried away a lot tweaking and changing little things.

But really the advanced AI's at the moment arent as advanced as they seem.

NTAI for example

engine calls the GlobalAI class

global AI class calls the Global class

All objects in NTAI have a pointer to this global class.

Global class spawns agents, and relays all events to them (update() unitfinished() etc)

there are 3 agents, Scouter(scouting), chaser(attacking), and Factor(building).

Factor loads a buildtree and shoves it in a units class, then the unit follows the tasks list

Scouter keeps a list of units it considers to be scouter, and when UnitIdle is called, fi that unti si idle it's given a move command to the next scout position.

Chaser sorts attacking units into groups then sends them groups to the sector fo the map with the highest threat value.

It also tells untis to attack nearby enemies, fire dgun weapons, missile silos, and change trajectory among other little things.

But really what you need first is ideas as to how you're gonna do something, as in how will you automate attacking, or how do you think ti should be done, then expand on that working downwards till you meet a stage where it's transferable to code.

However beware fi you enter for competitive reasons only, I've been here for a longtime and I'm still going out of competitive reasons and krogothe is here for that too ^^ and we both have a head start....

Posted: 16 Mar 2006, 20:37
by krogothe
AF wrote: However beware fi you enter for competitive reasons only, I've been here for a longtime and I'm still going out of competitive reasons and krogothe is here for that too ^^ and we both have a head start....
Competition isnt my main incentive, its both learning c++ and testing out theories that i made ages ago but couldnt test!
Although it cant be denied that seeing KAI beat other AIs is satisfying, even if it doesnt happen very often!

Posted: 17 Mar 2006, 09:09
by SeanHeron
Thank you very much for the source! Its already helped understanding how to get krogothes Metalclass to work :D .
Don´t have the time to try it out at the moment though...

Posted: 19 Mar 2006, 15:00
by Spectre
I made it compatible with AA 1.44 now...
http://fileuniverse.com/?p=showitem&ID=2709

sometimes it beats OTAI and AAI on comet catcher remake in both AA 1.44 and XTA ;) (1on1)

Posted: 27 Mar 2006, 20:35
by Spectre
update:
builds vehicle / air now... but still much work to be done.

http://rapidshare.de/files/16570869/SAI01.zip.html (FU didnt work .. strange)

Posted: 27 Mar 2006, 22:36
by BvDorp
Nice!

How's ur AI set up? Just some major big program that manages all units, or will it have more advanced AI tactics? Like some ant-kind-AI?

Posted: 28 Mar 2006, 09:17
by submarine
wow im really surprised! your ai performs quite good and doesnt crash - imho its currently the best sparring-partner for aai :)

Posted: 29 Mar 2006, 18:46
by BvDorp
how's AAI development anyways?