scouting

scouting

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

scouting

Post by greenail »

I would like to discuss how people have implemented scouting in their AI, I'm only looking for theory if you have a code example and you can comment your code in such a way that it is easy to see how your code matches your theory.

As a benchmark, I was wondering if we could develop a test to prove which approach conconsistantly better. perhaps "a find the last unit" test. This may end up as the first match in the "AI War" mod.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

None of them can be counted as the voerall best they all have their pros and cons.

First LOS used in a skirmish AI:

LOS based, JCAI:

JCAI kept a grid of sectors each with a value signifying how long ago it was last in LOS. A scout would constantly be re-assigned a new position based on a simple algorithm that gaged where to go according to the value and its distance from the scout. It was very effective at creating search sweeps with aircraft, but it didnt take into account land/sea and how it affected ground units.

Random AAI/OTAI:

Units where sent to random positions to look for the enemy.

Random NTAI:

A sector grid was setup and scouts would goto each sector one by one but a random large number of sectors was missed eachtime


Startpos OTAI & NTAI

First sued by NTAI the modified CSunParser class was used to read off the starting positions of the players and scouts where sent directly to each one in turn.

Mexes NTAI:

Scouts visited each and every mex in turn then started over again, working on the promise that the enemy will build mexes and thus they can be found near mex spots.

NTAI and JCAI have specific untis it scouts with, such as JCAI's aircraft and NTAI's freakers, the other AI's seem to just use any unit they have that is an attack unit and sends it out to scout, exept OTAI which I'm unsure of lately. KAI searches out randomly then units commune on any found location before swarming randomly again.

As i said no one algorithm is the best, hence why NTAI uses 3 different scouting algorithms
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

AF wrote:
Random AAI/OTAI:

Units where sent to random positions to look for the enemy.
sorry but i would appreciate if you let me explain my ai myself, especially if you dont have clue how it works...

aai does not send scouts randomly around, it decides where to send its scouts based on the time that elapsed since the last scout has been sent there and the importance of the location (-> how often it scouted units/buildings) there)
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post by greenail »

code and comments?
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Mine isn't entirely random, either. It won't send them if they can't go there (land/water issues) or if there is already LOS there. More to the point, it uses a custom random number generating class that I found in a book to get random numbers without getting the same ones over again until all of them are gotten, so it won't check the same place twice for quite a while, except at the beginning when it's looking at start locations.

Also, it's more likely to scout where enemies have been seen before.
Post Reply

Return to “AI”