NOTE For this book, I chose to aggregate the Regulator instances in the
Raven_Bot class because it makes their use more explicit. You may prefer for
the objects requiring regulation to instantiate their own instances and use them
to control the flow of logic in the appropriate method (usually their
Summing Up
This chapter has provided an overview of the design of AI for agents capa
ble of playing a deathmatch type game. Although your understanding is
still incomplete, you have seen how an agent’s AI can be decomposed into
several small, easily managed components, which are capable of communi
cating and working together to form a unified behavior. The remaining
chapters will provide the plaster to plug the gaps in your knowledge.
Practice Makes Perfect
1. So far, Raven bots can only sense opponents they see or hear. How-
ever, they are still unable to feel the terrible burning and ripping
sensation of a steel bullet casing tearing through their flesh. Write
code to update their sensory system so that a bot is able to sense when
it is being shot at. Create another field in the
MemoryRecord structure to
record the amount of damage each opponent has inflicted in the last
few seconds. This value could be used as part of the target selection
2. Try out different target selection criteria. Observe how they affect the
gameplay. Change the code so that each bot uses a unique criterion
and play them off against each other to see which one performs best.
Raven: An Overview | 331
Summing Up
This page intentionally left blank.

Get Programming Game AI by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.