Wednesday, June 02, 2004

All for One, or One for All?

So, I've done it. I decided to prove once an for all which is better, free-for-all (FFA) targeting (Where the player lets the AI automatically pick random targets) or focused targeting (Where the player tells the AI to ignore all targets but one and all units fire on that one target.)

So I wrote a program where all the foes used random targeting (Pick a guy and shoot him, next time around shoot another randomly selected guy.) and the friends used either FFA for Focused targeting. Each team starts with 10 guys each with 10 HP. Each time a guy is shot he looses 1 HP. 0 or less constitutes dead. The fight continues till one team is out of guys.

Now this is unrealistic because normal autofire AIs are based on the "Return Fire" principle, where the AI shoots the first person who shot them, and in more advanced AIs, shoots the guy that appears to be the largest threat (The Hate system). But it is close enough to true random that random will get us close for this test.

I also used a random method to determine whose turn it was to shoot. A random team is selected, and then a random guy on that team. That guy then shoots a guys on the other team and a new guy (from a random team) is selected.

And with the spread in the results, that AI difference would have to be pretty damn important to overcome the difference!

In 100,000 games, FFA tactics (by both the AI and the 'Player') yielded a 49.8955% Win/Loss ratio. This shows that my random number generator has a bit of a bias, as this number should be an approximation of 50% since both teams use the same strategy and the strategy has no biasing in it to favor one team or another...

The impressive point is that using Focus tactics (Everyone shoots guy #0 till he's dead, and then moves on to guy #1, etc...) against an FFA AI, the Win/Loss ratio shoots up to 99.779%. This suggests that against an AI of even power, differing only by strategy, a win is just shy of assured. Those are some pretty impressive odds!

What does this tell us? Pick a man and stick to him. Don't just shoot at the closest thing. Work as a team and you're much more likely to suceeed.

Check out the test source code

No, no!!! The left one! THE LEFT ONE!!! stupid AI

Mood: Egocentric and Sleepy