documentation

documentation

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

Moderators: hoijui, Moderators

Post Reply
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

documentation

Post by greenail »

i'm putting some documentation of the groupAI up at

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

feedback welcome...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Excellent, should be very helpful for beginners :-)
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post 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++
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

Added the description of TestAI.cpp.
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post 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.
Kelson
Posts: 76
Joined: 29 Oct 2005, 08:32

Post 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
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post 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..)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post 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
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post 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.
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post 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++.
Post Reply

Return to “AI”