Page 1 of 1

documentation

Posted: 23 Jan 2006, 01:25
by greenail
i'm putting some documentation of the groupAI up at

http://taspring.clan-sy.com/wiki/Greenai

feedback welcome...

Posted: 23 Jan 2006, 02:07
by Argh
Excellent, should be very helpful for beginners :-)

Posted: 23 Jan 2006, 02:13
by greenail
i added more, and plan to keep it updated with what i learn. it is not easy to get all this from the source and I have to give kelson credit for helping me our with some c++

Posted: 23 Jan 2006, 04:59
by ILMTitan
Added the description of TestAI.cpp.

Posted: 23 Jan 2006, 16:24
by Lindir The Green
So... What exactly is the difference between a group ai and a global ai?

You said that the nanoblobs ai is a group ai, but it seems that it completely controls an army :|

Is a global ai just a group ai that is activated at the beginning of the game?

If so, the documentation will be really useful for me.

Posted: 23 Jan 2006, 16:48
by Kelson
Group and Global AI's differ in only how the program handles them. Global AIs are initialized at the start and include callback functions that allow the program to tell the AI when something occurs (and what that something was). Group AI's lack this ability, so one can imagine a groupai being a callback-less GlobalAI (that requires considerably more work for maintaining accurate 'state' of the world though...callbacks make life easy).

Besides those differences, they both use the IAICallback interface and have similar code access. The documentation should be fairly useful as a result :D

Posted: 23 Jan 2006, 20:25
by AF
A groupAI is assigned to a unit/untis by the user. A globalAI behaves like a skirmish AI.

GroupAI's and GlobalAI's have their own seperate callback interfaces, from which they both share a function that returns the IAICallback itnerface. GlobalAI's can cheat when cheating is turned on

Posted: 23 Jan 2006, 20:44
by Chocapic
GlobalAI's can cheat when cheating is turned on
indeed...
Id like to see in the future a possibility for the ai to cheat without them being turned on as it happened in ota (as i remember it..)

Posted: 23 Jan 2006, 20:56
by AF
Cheating in OTA wasnt the same, it was dependant on the AI being able to build things that ahd no visible button in the build menus, so the AI could build ti but you couldnt. These buildings being invisible and having unfair amounts of resources being generated. This wouldnt wokr in spring though because ofthe way it handles build menus.

Allowing a globalAI to cheat without typing .cheat would be unfair because ti is possible to play a game against soemone else yet ahve a globalAI cotnrolling your untis with you. Try adding aidll=NTAI.dll to a script udner your player entry and starting the game and you'll see what i mean.

Posted: 23 Jan 2006, 21:19
by Chocapic
Allowing a globalAI to cheat without typing .cheat would be unfair because ti is possible to play a game against soemone else yet ahve a globalAI cotnrolling your untis with you. Try adding aidll=NTAI.dll to a script udner your player entry and starting the game and you'll see what i mean.
i hadnt thought about that, good point.
and having unfair amounts of resources being generated
i meant like that, having a way of generating res like for instance .atm for the global ai only (not group ai), so that ppl could choose a cheating or not ai to fit their play strength

Posted: 23 Jan 2006, 21:22
by greenail
lets not get off topic. this thread is for defining how stuff works, or asking to see how something works, and you should realy be updating the wiki instead of putting it here. Lets not go on a "put this in AI", "this concept is better than that one" thread.

Posted: 25 Jan 2006, 17:32
by greenail
Should I pull out my HowTo list and put it under groupAI?

Perhaps we could have one for the globalAI as well. I'd also like to see a way we could do some peer review of our code, I know I have a ton to learn about design, and c++.