JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section


Craig Reynolds's obstacle avoidance algorithm relies on the obstacles being a particular shape, namely circular. Other obstacle shapes are approximated with a circular bounding volume. The knowledge of the obstacle allows the AI to steer around it quite effectively. However, this is a significant assumption to make—especially in complex game environments. Using circles as an approximation can be particularly challenging (for instance, long and straight corridors).

The generalized obstacle avoidance is more desirable for this reason. Sadly, it too relies on some mathematical knowledge of the obstacles—notably the orientation of the obstacle surface (it's normal). This is acceptable when the environments are simple, or when the world's structure is preprocessed for the AI. If this proves to be problem (when normals are not available or if they are misleading), the algorithm may require adapting. The original obstacle-avoidance algorithm is described first, and then the adapted version.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor