greedy - Algorithm to find smallest number of points to cover area (war game) -
I am dealing with war games. I have a list of my locations I needed to cover the largest possible area for at least the coordinates of the bases. I wonder if it is a better way to look at all the possible combinations and because the number of bases can reach thousands. is. Example: If the radius of attack 10 and I have five bases in one square and its center: The Note 1 solution should be single-threaded. Note 2 is not required to complete the solution if it means that the number of profit bases in a bigger speed reaches to thousands and it is possible for as long as possible Need to use. I can consider running up to 100 miles of 10,000 positions on a modern computer, so it is unacceptable to modern computers, so I was thinking that I can clear it clearly, such as the Solution is the solution you need. If you want a real-time answer, maybe a greedy algorithm may provide better solutions. Other solutions may be meta-peripheral experiment with constraint time () I may be able to find a solution to this problem under a limited time, of genetic algorithm Will use If interested, then I can provide a toy example of implementation in Python. Edit: When you have to provide solutions quickly, greedy algorithms are often better but in your case, I suspect that there is a speciality of many greedy algorithms that you can get from scratch Every time you need to start trying to calculate a new result Genetic algorithms are being talked about again, for example you can do every time you start a decision to reverse the search process with your ultimate result, you might actually change it There is a subproduction and each 100ms can be a better solution of calculation during the last loop. If computing is not too greedy in processing, greedy on this solution will provide better results than one. The long lasting position as a solution should probably be adapted for change in the situation, but many Elements will remain unchanged. Just keep in mind that starting a meta-search with a greedy algorithm is a good idea anyway! B (x, y) , from which I can send an attack on the enemy (they are the basis between their own bases). Each base
b can attack a border
R (same radius for all grounds) I attack as many enemy bases as possible How can I get my bases to be able to, but how can I use the minimum number of bases?
(0,0) ,
(10,0) ,
( 10,10) ,
(0,10) ,
(5,5) So the answer is that only the first four will be required because one in the center All the areas covered by it have already been covered by others.
R / 10 The distance of each other, eliminate all except one except (whatever).
Comments
Post a Comment