JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

Refining the Problem

This section discusses how to apply knowledge of the problem as development practices. Specifically, problems are simplified so that common AI techniques can solve them, or split recursively into manageable subproblems.


Generally, the inputs and outputs are defined in a flexible fashion to prevent us from having to change the interfaces for each of the prototypes. It's often necessary to refine these interfaces before developing the solution (see Figure 21.9).

Figure 21.9. Refining the problem into a simpler one. The inputs are reduced into important features, and the actions set the outputs.


AI techniques generally rely on getting concise data represented in a convenient format. The raw information available from the interfaces is often unsuitable or partly irrelevant, so the AI techniques often need help to solve the problem.

For the AI to perform well, we provide it with features and actions. As far as data flow is concerned, features and actions are still considered as inputs and outputs, although they are usually highly relevant to the solution. The AI engineer generally selects these features by refining the inputs in a concise fashion. For example, the target selection is provided with features about the disposition of players in space (instead of the raw vectors), and the output is used to evaluate the benefit (instead of providing the point in space directly).

We can understand this refinement as an additional layer of pre- and post-processing used to simplify the information. In essence, this reduces the domain (input) and divides the codomain (output). The size of the refined domain is also thereby decreased.

Divide and Conquer

Understanding the domain in depth makes it more obvious how to decompose the problem. This is particularly appropriate if there are dependencies between certain inputs and outputs, or if the outcome has distinguishable patterns.

Finding the right decomposition is a matter of identifying the aspects of the problem that can be dissociated, and then creating a component to handle it separately. In this case, the input and output domains are divided into multiple subdomains. The input domains of the subproblems will almost always overlap. However, the outputs can be handled independently (see Figure 21.10).

Figure 21.10. Splitting up the problem of shooting into multiple subproblems of aiming and firing. The input domains are often similar, but the outputs domains can be independent.


The problems can be refined recursively at will until they reach a manageable level that can be solved with a simple AI technique (a process much like software design). Combining the subproblems is then a matter of organizing the components together. The flow of data between these components needs to be managed using the architectural patterns discussed in Chapter 3, "Reactive Approach." For example, the outputs can be combined by suppression or combination; the components can be assembled sequentially or distributed.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor