上QQ阅读APP看书,第一时间看更新
Chapter 3. Adding Randomness and Probability
In this chapter, we will introduce randomness and probability techniques that can be used to add randomness, chance, and character to AI, which would otherwise be perfect. We will start with a quick "Probability 101" to explain some basic concepts; then, we will demonstrate how to use Stream to control a non-uniform distribution of numbers and use these results to demonstrate probability. We will cover how these are used within Unreal Engine 4. Finally, we will build on top of our enemy AIController to have it randomly perform an action.
This chapter will cover:
- Probability, probability distribution, and non-uniform distribution
- Using RandomStream in UE4 to add randomness to our AI
- Adding random behavior to enemy AI-based states