JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

Chapter 34. Adaptive Defensive Strategies with Genetic Algorithms

Key Topics

Because two entire parts of this book focus on offensive strategies (for instance, shooting and weapon selection), it seems appropriate to balance out the animats' skills with defensive strategies—such as dodging fire or jumping unpredictably.

The preceding two chapters discussed new technology that allows the creatures to adapt to their environment, based on Darwinian concepts. So, instead of manually crafting fuzzy rules as defensive strategies (as we learned in Chapter 31, "Enhancing Movement Behaviors with a Fuzzy System"), the creatures learn how to defend themselves successfully within the game. We'll achieve this by placing them in a competitive environment and use evolutionary techniques to select the fittest behaviors (specifically, using genetic algorithms). We'll focus on dodging fire and rocket jumping in the following sections, but jumping unpredictably to prevent being shot will be left as an exercise—extending directly from the principles behind dodging.

This chapter covers the following topics:

  • A custom representation for sequences of actions, notably focusing on the parameters for each action and timing issues.

  • Some genetic operators that can be used to manipulate these sequences of actions. These mutate and crossover operations will be capable of manipulating the behaviors as if they were genetic code.

  • An outline of our evolutionary algorithm, with a description how to create better sequences over time.

  • A general-purpose genetic algorithm module. This will interface with any other components that can be evolved. At least we'll have the option of using this robust solution, despite the simplicity of our problem.

  • A discussion of the fitness function from a behavioral perspective and the different fitness components that prevent loopholes (leading to undesirable behaviors).

  • An overview of the different implementation issues, as well as testing issues.

  • An analysis of the behavior of the animat briefly and theoretical limitations of the solution.

At the end of this chapter, the animats are no longer defenseless in the face of oncoming rockets.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor