JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

Emergence in Functionality

As a general case, it's possible for functionality to emerge from systems. Given a set of simple components connected together, the result is often more complex than a mere combination of its parts. With different interpretations of the definition, algorithms composed of multiple independent phases may be considered emergent.

We'll take the perspective that emergence cannot be foreseen, so it shouldn't be possible to devise an algorithm purely based on theory. However, we'll assume that emergence can be designed thanks to experimentation. This approach is more constructive because it means two things:

  • Developers can harness emergence to solve problems.

  • It's possible to adjust emergent phenomena.

In many ways, when complex reactive systems (or behaviors) are created, their functionality emerges by design. Game AI development can benefit from emergence in many ways, so any methodology that can help harness such chaos is welcome. In some systems, emergence is debatable, but the methodologies presented here apply equally to both scenarios.

Just as intelligence is an emergent phenomenon based on straightforward chemical mechanisms, many believe that complex software programs emerge from simple rules of the computer. Taking this software engineering approach provides practical insights into dealing with the development of AI—particularly how to craft simple reactive rules into complex behaviors.

Assembling simple components together to produce elaborate emergent functionality is a matter of engineering in different forms:

  • Architectural patterns provide outlines for creating emergent systems with concepts that are likely to work. For example, both voting systems and the subsumption architecture are well suited to provide emergent patterns, but remain easy for the developer to adjust.

  • Design methodologies provide methodologies to control resulting functionality. Agile development techniques match perfectly with AI creation, because it advocates evolutionary design to harness the chaos of the development process.

In practice, agile development is based on the following principles (although not exclusively limited to emergent patterns). Each principle is presented along with its benefits for AI:

  • Feature-driven development focuses on important features desired by the customer. In game AI, the designers are the main customers; primary features are the forms of implicit control that need to be handled immediately. Secondary features are explicit behaviors required in particular situations.

  • Test-based validation of the behaviors ensures that the system does not break as functionality is added. It also provides a measurement of progress. Each AI behavior can be tried by setting up a script with game logic and testing the result—as with evolutionary approaches. Minimal fitness is required for the test to pass.

  • Fast iterations in the development build the functionality of the system incrementally. In AI, the engineer can focus on establishing the behaviors one by one, building up the system as an architecture (for instance, with a flat organization or a hierarchy of layers).

  • Extensive refactoring is used to extract common functionality from each of the behaviors and place them into common components when necessary. By implementing the behaviors first, the interfaces to the components become obvious. The refactoring also keeps the code clean and maintainable, which makes it easier to debug and extend.

These procedures are considered part of evolutionary design. In this case, there's no planned design, but the functionality emerges incrementally. Evolution is thought to be the strongest way to create emergent patterns, and borrowing these methodologies can help us harness the power of emergence as game AI developers. The result is NPCs composed of simple components that interact with simple mechanisms to provide complex functionality.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor