In this chapter, we are going to look at how we can apply the concepts of probability and randomness to game AI. This chapter is more about generic game AI development techniques in the areas of randomness and probability, and less about Unity3D in particular. This means that we can apply the concepts of this chapter to any game development middleware or technology framework. We'll be using mono C# in Unity3D for the demos mainly using the console to output data, and won't address much on the specific features of the Unity3D engine and the editor itself.
Game developers use probability to add a little uncertainty to the behaviors of AI characters, as well as to the wider game world. Randomness makes the artificial intelligence system less predictable and provides a more exciting, challenging, and fair experience.
In this chapter, we will look...