O'Reilly logo

Behavioral Mathematics for Game AI by Dave Mark

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

Testing the Algorithm

We will now take our new algorithm for a complete test drive to test some combinations of factors. When conducting this process, it is best to start with something simple and predictable. For example, if we place our three Dudes the same distance away from us and the same distance away from the detonator, and arm them all with the same weapon, we eliminate many of the possible variables.

Parameters:

DudeDistanceDist. to Det.Weapon
Baddie150100Machine Gun
Evilmeister150100Machine Gun
Boss Man150100Machine Gun

Results:

NameWeaponThreatUrgencyScore
BaddiePistol754.60.3692,044.7
BaddieM/G6.90.36918.8
BaddieShotgun754.60.3692,044.7
BaddieR/L7.00.36919.0
EvilmeisterPistol753.10.3692,040.8
EvilmeisterM/G6.60.36918.1
EvilmeisterShotgun753.1 ...

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