| Home Page | Recent Changes | Preferences

Bot Navigation

This is a page on the technical aspects of how bots navigate a map. For info on adding bot support to a map, see Pathnoding.

External Links

The All-Time Definitive Reference on Artificial Intelligence and the Navigation System for Unreal Tournament can be found at: [Unreal Tournament AI and Gameplay for Level Designers] Written by Steve Polge.

Tarquin: I'm pondering: can we import this to a page of its own, the same way we imported Tim Sweeney's doc?

Introduction

There are actually three UnrealEd Console commands that will automatically build a PathNode system for your Level:

 PATHS BUILD  auto create pathnode network - opt=1
 PATHS BUILD HIGHOPT auto create pathnode network - opt=2            
 PATHS BUILD LOWOPT auto create pathnode network - opt=0

It is the UnrealEd community consensus that using the PATHS BUILD Console Command, (an automatic PathNode generator which will do part of the work of placing paths automatically), creates an inferior Bot Navigation System for your Level. It is highly recommended that you do the Pathnoding manually.

Creating the Navigation Network

(from the Unreal Technology Page)

Unreal Tournament Bots use a system of waypoints to navigate the level. Using waypoints allows UT to minimize the CPU cycles used by the AI and gives level designers maximum control over how the AI navigates their levels. These waypoints are defined by placing actors which are subclassed from NavigationPoint in the level. This includes actors

such as PlayerStarts and Teleporters which designers will place to make their level playable. Certain NavigationPoints, such as InventorySpots and WarpZoneMarker?s are automatically placed when the designer "defines" the paths. Other NavigationPoints are intended for Unreal I style single player situations and are not used at all in UT. These include AlarmPoints, ButtonMarker?s, PatrolPoints, QueenDests, SpawnPoint?s, Transporter?s, and TriggerMarker?s. Once the level geometry is complete, the level designer should fully map the level into the navigation network using PathNodes. Place PathNodes at intersections and turns so that there is as much clearance as possible from corners (at least 50 world units if possible). Paths need a line of sight to each other, clear to the width of the maximum width (Twice the collision radius) of creatures which will use this path. PathNodes should not be placed more than 700 units apart. Since PlayerStarts and Inventory will be placed on the navigation network, the designer can (and should) not place PathNodes where these other NavigationPoints can substitute. On stairs and ramps, the PathNodes should be no more than 350 units apart. The objective should be to use a minimum number of PathNodes to completely cover a level. Unreal Tournament bots use a system of waypoints to navigate the level. Using waypoints allows UT to minimize the CPU cycles used by the AI, and gives level designers maximum control over how the AI navigates their levels.

To navigate around the level, bots will first find the nearest reachable NavigationPoint, and move to it. They will then move toward their destination, going from NavigationPoint to NavigationPoint. It is important that some NavigationPoint is reachable (there are no obstructions in the way) from any location a bot may reasonably get to in the level. If a bot can't find a valid path, either because it can't find a way to get on the network, or there is no valid way to get from the network to its destination, or the path on the network is broken, then the bot will wander (walking) around its current area.

The final step in setting up the navigation network is performing a PATHS DEFINE. This can be done by typing PATHS DEFINE into the UnrealEd Console, or pressing the "Paths Define" button in the lighting section of the rebuild window. The designer can examine the network generated in any of the UnrealEd world view windows by selecting "Show Paths" from that window's "View" menu. NavigationPoints which are successfully connected will have either blue or red lines between them. Bots will use either blue or red paths, but blue paths are preferable - they indicate a cleaner, more obstruction free path. Each time geometry is changed or NavigationPoints are added or moved (including inventory, since paths are generated from inventory items), a PATHS DEFINE should be performed.

There are several common problems that result from assumptions and approximations made by the AI to minimize CPU overhead. Make sure that all NavigationPoints are separated by at least 50 world units. If two pathnodes are too close together, a bot may get stuck on them. The editor log window will display warnings during a PATHS DEFINE if paths are too close together. This problem commonly occurs with InventorySpots, which are automatically placed near all inventory items. Don't place PathNodes too near to inventory.

In some situations, bots may get stuck on the edge of a ledge where it runs into a wall. This occurs because of a threshold problem. Bots won't jump off ledges until the angle of their destination is greater than 45 degrees from the ledge direction. If they run into a wall right around this threshold, they may get confused. The solution is to adjust the NavigationPoint they were trying to reach, or add an intermediate PathNode.

Bots will have problems if the NavigationPoints are too high off the ground. Make sure that the NavigationPoint is no more than 1.5x the bot's collisionheight off the ground. This will normally be the case automatically, but in a few situations (such as very steep ramps), the level designer may need to manually adjust the Z position of the NavigationPoint. PathNodes for the bots to use while swimming must be in the water. Placing paths above the water's surface will result in bots bobbing at that spot, attempting unsuccessfully to levitate to the PathNode's location. WarpZones should be at least 70 units deep to allow the AI to handle them properly.


Category Mapping

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In