Flylib.com

Books Software

 
 
 

Training Zone

Training Zone

Given all these factors that influence the weapon selection, we need to agree on a terrain that will be representative of the ones we're interested in, and that will allow easy development of the AI.

We need a terrain where a lot of ammunition and weaponry are available. This will enable us to not cheat by giving the bots all the weapons to play with. More than just a principle, this has the advantage of forcing the bots to use all the weapons (as they pick them up).

Alternatively, we could enforce the use of specific weapons during different stages of the game. This would allow the animats to get to grips with each of the weapons without any bias. Either option seems feasible for learning about all the weapons, so we can use whichever approach suits our training zone best.

Ideally, when developing the AI, we would also like as many scenarios as possible occur. This is also for the sake of diversity. Most game levels will have a good blend of architectural styles. However, we should not feel limited to any one level during the development. This will allow the animats to acquire the most experience with the weapons.

Summary

In this chapter, we've briefly covered most of the aspects of the game design that affect weapon selection (implicitly). As discussed, some assumptions will influence the specification:

  • Weapons have certain properties such as projectile speed and reload times.

  • The various weapons behave differently when performing similar tasks .

Some environmental restrictions also affect the weapon-selection process:

  • Aspects of the environment's design combine together to determine the applicability of a weapon (for instance, obstacles).

  • There are characteristics of the combat itself that make particular weapons suitable (for instance, distance and movement).

  • The skill of the players is an important restriction on the effectiveness of weapons.

Finally, we drafted some guidelines to assist the testing and experimentation:

  • We need to maximize the variety of weapon use -either explicitly or not (for instance, good weapon availability).

  • It's important to emphasize the diversity of terrains by using many different levels.

The next chapter investigates the problem of decision making and how human players perform the task.

Practical Demo

The demo animat is known as Mr. Versatility -partly as an example of the ideas in this chapter, and partly as an extension of the capabilities of the previous part. Mr. Versatility is capable of using all the weapons in the game, and has shooting skills for each of them. Most importantly, a description of the AI architecture is available online at http://AiGameDev.com/ along with the source code and demo, as usual.


Chapter 23. Weapon Selection

Key Topics

  • Appealing Choices

  • Evaluation Process in Practice

  • Criteria for Weapon Selection

  • Case Study

Selecting the best weapon is a matter of decision making. The preceding chapter covered all the information that is taken into account in the process. This chapter analyzes the role of decision making and how it can be achieved, specifically in the context of weapon selection. Notably, we'll discover how the benefit of a weapon can be determined from properties of the situation and attributes of the weapon.

This chapter covers the following topics:

  • A theoretical approach to decision making, covering the evaluation of weapons and the methodology for picking them

  • Two opposite solutions to this problem in practice ( deduction and experience), and how the human approach to decision making is balanced between these two extremes

  • The criteria used to evaluate the weapon-selection behaviors of animats

  • A brief case study that describes the expected reactions in different situations

By the end of this chapter, the foundations will be set for solving the problem of weapon selection using AI techniques. In fact, the following pages describe a variety of different implementations .