Which unit do you shoot first?

Welcome to the news archive. Here you'll find all the news items, ordered by date. You can use the links below to read other news items, or go back to the archive overview.

2007-04-11 20:03 - Which unit do you shoot first?

In every Real Time Strategy game, there comes a time that you face your enemy in combat. Then you have to decide which unit to attack first. There are many ideas about optimal strategies, and many of them have good arguments. I decided to write a small simulator to find the optimal strategy.

I implemented strategies based on the number of hit points and the firepower of enemy units. Every simulation round all the enemy units fire at me, and I fire at a single enemy unit. The best strategy? Find the unit with the most firepower per hit point and whack it. However, this does requires quite some math, since the hit points change and thus the firepower / hit point ratio changes about every second.

Unless you can do a lot of math in a very short time, easier to fire at the unit with the most firepower. Almost just as good is shooting at the unit with the least hit points. Which one of those two is best probably depends on the game and the units you're facing.

Focusing your firepower on the unit with the least fire power or the unit with the most hit points is really bad. It's better to just pick a unit at random.

Here are the actual results. The number is the total damage the enemy units did to the simulated "me", hence lower is better.

  • findMostFPperHP: 2934277

  • findMostFP: 3546364

  • findLeastHP: 3603899

  • findRandom: 6908600

  • findLeastFP: 7470776

  • findLeastFPperHP: 10460769

  • findMostHP: 10482618

Post a comment


Comments

There are no comments on Which unit do you shoot first? yet. Use the form below and be the first!

Post a comment

Use Restructured Text to markup the comment. The link opens in a new window.


All fields are required, except when otherwise noted. You can use a limited subset of Restructured Text to markup the comment.

It might take up to five minutes for your comment to show up, due to caching of the pages.