Sign in to follow this  

AI scouting

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm designing the AI for my RTS game. Therefore an efficient scouting AI is needed. I mean, when the game begins, the player is supposed to explore the area and find gold mines etc. I actually don't know how to tackle the problem. I have a heightmap-based terrain. For pathfinding there is also a regular grid of nodes which store visibility information as well (visible? visited?). My only idea was to iterate all nodes and find out which were not visited yet. Then send some units there. However, I think this is a very inefficient approach. I'm happy about any suggestion ;)

Share this post


Link to post
Share on other sites
Try to think of what you want exploration to look like. Picking an unvisited spot at random means that during exploration you have a bunch of random lines drawn on the map, it will work but it will look funny. I would weight locations near the base(in travel time not location, don't want the explorer to run half way across the map just to cross a lake when I don't know what is 5 feet away from my front door) above those far away so that you sweep out from your base. I am not sure I would even do path finding for him just give him a direction of travel that keeps him in the unknown and close to base.

Share this post


Link to post
Share on other sites
If height confers a scouting advantage perhaps you could set them to continually seek out the high ground then task other scouts with filling in the blanks. Your heightmap is a preexisting potential field. The fill-in-the-blank scouts could use the unvisited/unseen nodes for lowering the cost in A*.

Share this post


Link to post
Share on other sites
One method of determining exploration priority is to layer some influence maps. Lay one down that radiates from town centers. That will prioritize unexplored areas that are close to you. Then lay down a map that radiates from unknown areas, but zeros when it hits a visible square. That way, greater weight is put towards larger unexplored zones rather than the minutia. The third one is a distance radiating from the actual agent itself and is an inverse map. That will bias things that are close to the agent.

Note that the two main maps can be calculated for and shared by your team in general whereas the 3rd one is individually held.

When you combine the results of the three, you will get a combined map that pulls the agent to unknowns that are 1)close to him, 2)close to the base, 3)larger rather than smaller.

From a balancing standpoint, make sure that the "close to me" scale will take into account even the small stuff that is nearby, otherwise the agent may ignore single square unknowns even though he is standing right next to them.

There are two ways to process the path at this point.

1) Just pick a high-scoring place and move toward it.
2) Pick a VERY high-scoring place as the eventual goal, identify other high-scoring areas of interest that may be in the way and construct a path that moves you through them all. This is far trickier and doesn't necessarily give you that much more benefit.

Share this post


Link to post
Share on other sites

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this