User talk:Phil Carlisle

From TDN

This page is a Work In Progress.

Welcome to the Torque AI Pack v1.0


This part of the TDN website is here to provide the user with a basis for studying the Torque AI pack and for discussing and learning about the issues of various AI techniques available for using in general.

The structure of this documentaton should be reasonably clear, but is broken into the following sections:

'Torque AI Pack v1.0 Architecture Overview

In this section, you will learn more about the way the AI pack is architected. The reasoning behind the core systems and the functionality they provide.

Read the overview Here

Technologies provided in the Torque AI Pack v1.0

  • Pathfinding
  • Steering Behavious
  • Finite State Machines
  • Actions
  • A Simple AI "Task" system
  • A Sensor system
  • An event/message handling system

Getting started using the Torque AI Pack v1.0

  • Setting up the Navmesh/Navgrid
  • Using the new AI Actor
  • Making your own AI Actor
  • Setting up sensors

Technical reference documentation

This section dicussses in deeper detail the functionality of the Torque AI Pack v1.0, it describes each function, usage and any possible changes or improvements that can be made




Technologies provided in the Torque AI Pack v1.0


Pathfinding

Pathfinding is a fundamental action within most games, in the AI pack we address this issue as our main concern.

The purpose of the pathfinding technology included in the Torque AI Pack v1.0 is to offer you the user a usable solution. We provbide all of the basic technology you need, including the method of automatically generating the navigation grid "nodes" and a method of automatically connecting them. As well as this navigation mesh we also provide the base technology to allow you to generate a "path" between one point in the world and another. This path is generated by the very common A* algorithm and creates a very robust starting point to any game's pathfinding solution.

More about pathfinding technology

Steering Behavious
In addition to the normal pathfinding functionality, we often find that games supplement this with locally based "steering behaviours". This additional functionally allows for AI ased entities to avoid obstacles on a local basis. Normally the main pathfinding allows us to create a rough path to follow to get from one area of a mission to another. But it definitely doesnt make sense to include avoiding very small objects or other moving objects in that path. So in order to supplement that simple path, we incorporate the localised avoidance associated with steering behaviors. So we can inherently avoid small dynamic collisions by simply moving differently to avoid them.

The other main usage for steering behaviors is to provide animal-like movement patterns by combining the simplistic functionality of steering behaviors in a way that creates complex actual behavior from those relatively simple functions. In this way, we can emulate many creatures, such as birds, fish, sheep, herds etc.

More about steering behaviors

Image:BlockoutLeftA.gif Image:BlockoutRightA.gif
Steering Behaviours
For more information on steering behaviours, please refer to Craig Reynolds work at the site www.red3d.com/cwr
Image:BlockoutLeftB.gif Image:BlockoutRightB.gif


Finite State Machines

Finite State Machines (often called FSM's) are a simple data structure and algorithm which can often be used to create most game AI functionality. These are essentially very simple data structures and algorithms which provide a mechanism to allow only one "state" to be active at once. The Torque AI Pack v1.0 has classes to allow this functionality as well as extending the FSM concept to allow a more specialised form of FSM called a "Push Down Automata" or PDA.

More about finite state machines

Actions

Actions are the particles of action an AI object can perform. Things like picking up an object, throwing it, looking for an enemy, firing at them etc. At its heart, the Torque AI Pack v12.0 allows you to create AI based entities which respond to a number of pre-written "Actions" with which you can control thier behavior. In order to create custom functionality, we have included a tutorial on creating new Actions for specific functions as well as example AI Actors which show how to create and combine actions to recreate specific behavior.

More about AI actions

A Simple AI "Task" system

Tasks are used in order to give the AI programmer some control over the execution profile of the AI in thier games. The Torque AI Pack v1.0 incorporates the AI tasking concept to allow us to setup the AI to fit into a limited amount of CPU time by allowing us to choose how often a given AI task is updated. Based on common techniques used in game engines, this allows us to control the execution profile and lets us only perform the AI updates that need to be performed.

More about tasks


A Sensor system

Allowing the AI to evaluate its surroundings. The Sensor system is built on top of the task handling system so that the AI's CPU usage can be fine tuned for different requirements.

More about sensors



An event/message handling system

Event based programming is a fundamentally different method of programming but it has been proven to be very flexible and useful for many different uses. This system is intended to show you the value of such a system, especially for AI and game logic applications. We call this the message system (event and message mean the same thing in this context).

More about Message systems






Getting started using the Torque AI Pack v1.0


Setting up the Navmesh/Navgrid

The navmesh is a fundamental part of the Torque AI Pack v1.0 functionality and is the basis for almost all movement of AI controlled objects around the world. In this getting started tuturial, we will cover how to generate, modify and save the navmesh.

Navmesh tutorial

Using the new AI Actor

Having some default "Actor" class which allows you to drop in various types of default AI enemies with different behaviours is what the Torque AI Pack v1.0 is all about

Using the default actors

Making your own AI Actor

Have you ever wanted to create an AI "actor" which could perform a bunch of useful actions but also could react to its surroundings? Well now you can!

Creating your own AI actor

Setting up sensors

Sensors are the objects which allow us to activate AI entities after sensing changes in the environment

Using the AI sensors tutorial