Target Selection
I've been digging around on this subject for a few weeks now, and there doesn't seem to be much of anything good that I have been able to find, So time to start a new thread. So before I dive right into it let me try and define what it is I am looking for. This might turn into something of an essay by the time I am done writing.
I would like to define Target Selection as the process by which an AI determines where to focus its efforts. I'm trying to be as broad as possible because I would like to think that these concepts should be similar across multiple genres.
While I am currently developing an RPG, so my main thrust will probably be in that area, I would also like to consider how concepts could be applied in other games like RTS, FPS, Turn-Based games, etc. I'm also working on the assumption that there are two or more opposing forces with each force trying to defeat the other. Now I have played enough games to have identified that the process I use over and over again it to identify the advantages I have, Identify the disadvantages of my opponent, and exploit both. So the question becomes how to get an AI to do this.
Let’s lay down a set of assumptions.
First the AI has a set of resources, each of which can be given a different target. Let’s also assume that each of these resources has two lists; one list of everything that it is effective against, and another list of everything that it is ineffective against. Any targets not falling into one list or the other are considered normal, which is neither effective nor ineffective.
Let’s also assume that the AI should try to form a total strategy. If one resource stands a good chance succeeding at a target, It should consider that when deciding what to do with the next resource.
So by what process can this be achieved? First I am going to take a queue from A* Path finding. We have a list of Open Targets and a list of Closed Targets. The open list starts with every possible enemy target. The closed list starts off empty. Next we do the same thing with our resources. The Open Resource list starts with all resources that are available, and the close list of resources contains resources that have been assigned a target, so it starts empty.
Now, this is where the fun starts. The code starts with the list of Open Resources. For each resource it needs to calculate a chance of success against each of the open targets, this is the Heuristic that will vary from game to game, and it will need to take into effectiveness against a target, and that targets proximity to other targets, and the other targets effectiveness against the resource. It’s very likely that the target's value should also be considered. I would think that assigning a target a value of 0 to 1 to indicate chance of success. 0 being no chance and 1 being complete chance. Then also assign the target a tactical value of 0 to 1, 1 being a very important target, and 0 being an unimportant target. Now multiply those values to score the target. The highest score is the best target. In order for a target to obtain a high score, it will have to have both a good chance of success, and a high tactical value. It’s a little complicated but doable. Now this resource notes what its best target is and what its chance of success is. This is repeated for all open resources and all open targets. The result is that all the resources have selected their best target from the list of possible targets.
It’s entirely possible to stop here, but it will probably be more effective to refine things just a bit. Each resource has selected its best target, but it has also calculated a chance of success. So at this point we take the resource with the highest chance of success, and move it to the closed resource list. We also move its target to the closed target list, because if success is likely, then no other resources need to consider that target. Now lets assume that the resource with the highest chance of success is less than %50, this means the best chance is likely to fail. To correct for this AI needs to team up on a target. So we take the target of this resource and find another resource with the same target, and next highest chance of success. We add the chances together to see if it’s greater than %50. Repeat until a greater than %50 chance is achieved. Now we take these resources, and move them to the closed list, and we take the target and close it. Now we repeat the entire process with the remaining open resources and targets, until all the resources are used up.
Once this is done all the resources have a best target (including considerations for what other resources are expected to do.) So each resource should act as if the AI behind the resources has a master plan.
It’s interesting to note that this process might also be used to attempt to guess at what the opponent might try by switching the resource and target set. The result would indicate where defense needs to be increased.
Now there are some flaws to this. If the AI does not have sufficient resources, and enough targets are left unaccounted for, The AI could be overwhelmed. So the AI would have to check that it can cover more than half the targets to make the offence worth while, Otherwise it should concentrate on building up its attack capability. Another problem is that this seems like it could easily be defeated if the human is smart enough to throw everything it has into defending the first target, with the first target successfully defended, all the AI's calculations would be off, setting up a potentially devastating chain reaction. What if the AI's first target was taking out air defenses and this failed. The air attackers would likely then fail. But I suppose a flawless AI wouldn't be any fun now would it, since there would be nothing for the player to exploit.
I guess I am wondering is this level of AI overkill? Would it suck up too much processing power? Would it need to be combined with the time tested method of allowing the AI to expend more resources than a human player would have available? Are there other ways of selecting targets and formulating a plan? Is it worth the effort to make an AI that tries to plan ahead?
I think I am done. Questions? Comments? Suggestions?
First comment, summarizing is a worthy skill to developp! Most people wont read such essay in a forum.
This very computationally inefficient.
That depends on the game. in many, many games, most of the "targets" will be left alone most of the time.
You should check out google scholar for "cooperative AI". There are a LOT of work on this subject.
Quote:
For each resource it needs to calculate a chance of success against each of the open targets [...]
This is repeated for all open resources and all open targets[...]
This very computationally inefficient.
Quote:
So the AI would have to check that it can cover more than half the targets to make the offence worth while, Otherwise it should concentrate on building up its attack capability.
That depends on the game. in many, many games, most of the "targets" will be left alone most of the time.
You should check out google scholar for "cooperative AI". There are a LOT of work on this subject.
Quote: Original post by Steadtler
You should check out google scholar for "cooperative AI". There are a LOT of work on this subject.
Thanks, I'll give that a peek.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement