O'Reilly logo

AI Game Programming Wisdom 4 by Steve Rabin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.8The Engagement Decision

Baylor Wetzel—Brown College

baylorw@yahoo.com

You have 3 tanks, 2 fighters, and 5 infantry. Close by is the enemy’s army of 1 tank and 18 infantry. Should you attack? That is the engagement decision.

Whether or not to engage in battle—there are numerous ways to answer this question, each with its own advantages and disadvantages. In this article, we look at some of the ways to make this decision.

Deciding at Random

We should never discuss video game AI without mentioning random numbers. If we are faced with an opponent, it is certainly possible to decide whether or not to attack based on the flip of a coin or roll of a die.

Random numbers have many positive attributes, such as being easy to design, easy to implement, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required