官术网_书友最值得收藏!

Random and probability in AI

Imagine an enemy bot in a First Person Shooter (FPS) game that can always kill the player with a headshot, an opponent in a racing game that always chooses the best route and overtakes without collision with any obstacle. Such a level of intelligence will make the game so hard that it becomes almost impossible to win and thus frustrating. On the opposite side of the spectrum, imagine an AI enemy that always chooses the same route when it tries to escape from or attack the player. AI controlled entities behaving the same way every time the player encounters them, make the game predictable, easy to win, and therefore boring.

Both of the previous situations affect the fun aspect of the game and make the player feel like the game is not challenging or fair enough anymore. One way to fix this sort of perfect AI and stupid AI is to introduce some intentional mistakes in their behavior. In games, randomness and probabilities are applied in the decision-making process of AI calculations. The following are the main situations when we would want to let our AI take a random decision:

  • Non-intentional: In some situations, an NPC might need to make a decision randomly, just because it doesn't have enough information to make a perfect decision, and/or it doesn't really matter what decision it makes. Just making a decision randomly and hoping for the best result is a perfect solution in many real-world situations.
  • Intentional: As we discussed in the previous examples, we will need to add some randomness purposely to make them more realistic, and also to match a difficulty level that suits the player. We can use randomness for things such as hit probabilities, add or subtract a certain random damage on top of base damage, or make an NPC hesitate before start shooting. Using randomness and probability, we can add a sense of realistic uncertainty to our game and make our AI system more fair and/or unpredictable.
主站蜘蛛池模板: 新兴县| 永德县| 曲麻莱县| 长葛市| 调兵山市| 嘉义市| 郴州市| 阜新| 贵定县| 新蔡县| 无极县| 阳信县| 茶陵县| 苏州市| 萍乡市| 肃宁县| 崇阳县| 台南市| 彭泽县| 綦江县| 舒城县| 剑河县| 博客| 屏南县| 行唐县| 汾阳市| 利津县| 炎陵县| 嘉鱼县| 枝江市| 新和县| 塔城市| 隆德县| 盐源县| 灵台县| 广汉市| 鄢陵县| 兰西县| 上杭县| 龙海市| 宁海县|