- Unity Artificial Intelligence Programming
- Dr. Davide Aversa Aung Sithu Kyaw Clifford Peters
- 405字
- 2021-06-10 18:57:47
Path following and steering
Sometimes we want our AI characters to roam around in the game world, following a roughly guided or thoroughly defined path. For example, in a racing game, the AI opponents need to navigate on the road, and the simple reactive algorithms, such as our flocking boid algorithm discussed already, are not powerful enough to solve this problem. Still, in the end, it all comes down to dealing with actual movements and steering behaviors. Steering behaviors for AI characters have been in research topics for a couple of decades now. One notable paper in this field is Steering Behaviors for Autonomous Characters, again by Craig Reynolds, presented in 1999 at the Game Developers Conference (GDC). He categorized steering behaviors into the following three layers:
Let me quote the original example from his paper to understand these three layers:
Consider, for example, some cowboys tending a herd of cattle out on the range. A cow wanders away from the herd. The trail boss tells a cowboy to fetch the stray. The cowboy says giddy-up to his horse, and guides it to the cow, possibly avoiding obstacles along the way. In this example, the trail boss represents action selection, noticing that the state of the world has changed (a cow left the herd), and setting a goal (retrieve the stray). The steering level is represented by the cowboy who decomposes the goal into a series of simple sub goals (approach the cow, avoid obstacles, and retrieve the cow). A sub-goal corresponds to a steering behavior for the cowboy-and-horse team. Using various control signals (vocal commands, spurs, and reins), the cowboy steers his horse towards the target. In general terms, these signals express concepts such as go faster, go slower, turn right, turn left, and so on. The horse implements the locomotion level. Taking the cowboy's control signals as input, the horse moves in the indicated direction. This motion is the result of a complex interaction of the horse's visual perception, its sense of balance, and its muscles applying torque to the joints of its skeleton.
Then he presented how to design and implement some common and straightforward steering behaviors for individual AI characters and pairs. Such behaviors include seek and flee, pursue, and evade, wander, arrival, obstacle avoidance, wall following, and path following. We'll implement some of those behaviors in Unity in Chapter 6, Path Following and Steering Behaviors.
- 廣電5G從入門到精通
- 微商之道
- Web安全防護指南:基礎(chǔ)篇
- 物聯(lián)網(wǎng)識別技術(shù)
- Hands-On Industrial Internet of Things
- HTML5 Game development with ImpactJS
- 物聯(lián)網(wǎng)技術(shù)與應用
- IPv6網(wǎng)絡(luò)切片:使能千行百業(yè)新體驗
- The Kubernetes Workshop
- 計算機網(wǎng)絡(luò)技術(shù)及應用
- Microsoft Power Platform Enterprise Architecture
- 云計算技術(shù)與標準化
- 現(xiàn)代通信系統(tǒng)(第5版)
- Cisco無線局域網(wǎng)配置基礎(chǔ)
- Hands-On Reactive Programming in Spring 5