JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section


This chapter started by discussing the theory behind weapon selection:

  • The fitness of weapons is determined by mapping features and criteria onto a single value.

  • By comparing the fitness, we get an indication of the best weapons.

In practice, two fundamental ways to evaluate the weapons prove effective, and humans use a combination of the two:

  • Deduction uses existing facts to come to a conclusion about a weapon. Deductive reasoning can be used to extract better trends from experience.

  • Experience learns about the benefits of weapons in each situation.

Any of these three approaches may be used by the AI, as long as the approach fulfils its expectations, which we covered toward the end of this chapter:

  • As high-level criteria for the evaluation, we expect the behaviors to be justifiable and decisive.

  • The problem definition itself consists of a recommendation for types of weapons in certain situations, as well as restrictions.

The next chapter specifies the world interface used by the animats to perform weapon selection by interacting with their environment.

Practical Demo

A simple implementation of the selection method demonstrates the ideas in this chapter. The animat named Joyce has a weapon-selection component in the architecture. When called, this component scans through all the possible weapons and calls an unknown evaluation function to compute their fitness. The evaluation is done with a rule-based system, transparently from the weapon selection, and returns the best weapon. The demo and source for Joyce is available online at

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor