Introduction to AI: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(some more small changes, added a link to police_stander under Goals. also, a path_corner is NOT a script!)
Line 3: Line 3:
==Map Components==
==Map Components==
The following are all entities or groups of entities a level designer might place in a map to manipulate the AI. A map doesn’t require any of them for the AI to function, but the more the better.
The following are all entities or groups of entities a level designer might place in a map to manipulate the AI. A map doesn’t require any of them for the AI to function, but the more the better.
===[[info_node|info_nodes]]===
===[[info_node|Nodes]]===
These give the AI bearing in the world besides other NPCs or the player. They are required for all but the simplest of AI actions. When combined, these nodes form a roadmap of sorts for NPCs, or a node graph.
These give the AI bearing in the world besides other NPCs or the player. They are required for all but the simplest of AI actions. When combined, these nodes form a roadmap of sorts for NPCs, or a node graph.
===[[path_corner|path_corners]]===
===[[path_corner|Path_corners]]===
The most direct way of influencing AI is through the path_corner entity. It bluntly instructs the NPC to go to it, and they do so in the most direct manner possible. A path_corner is essentially a script placed directly in the map.
The most direct way of influencing AI is through the path_corner entity. It bluntly instructs the NPC to go to it, and they do so in the most direct manner possible.
===[[Goals]]===
===[[Goals]]===
Goals give the AI a task to fulfill in a semi-scripted manner. For example, a metrocop guarding a doorway from the player.
Goals give the AI a task to fulfill in a semi-scripted manner. For example, [[Police_stander|a metrocop guarding a doorway]].
===[[info_hint|Hints]]===
===[[info_hint|Hints]]===
Hints give AI contextual pointers that it would not be able to work out on it’s own. Areas safe to crouch and reload in, objects of interest, even places for birds to perch.
Hints give AI contextual pointers that it would not be able to work out on it’s own: areas safe to crouch and reload, objects of interest, or even places for birds to perch.
===[[Assaults]]===
===[[Assaults]]===
Assaults are the less scripted and combat orientated sisters of path_corners. Use them to move NPCs while retaining their tactical routines.
Assaults are the less scripted and combat orientated sisters of path_corners. Use them to move NPCs while retaining their tactical routines.
===[[Standoffs|Standoffs (Battle Lines)]]===
===[[Standoffs|Standoffs (Battle Lines)]]===
Standoffs give AI the specific instruction to fight hostiles. When in a standoff NPCs will act with more strategy and cooperation, holding certain areas while advancing into others. Standoffs are battle management for Source games.
Standoffs give AI the specific instruction to fight hostiles. When in a standoff, NPCs will cooperate in holding certain areas while advancing into others. Standoffs are a method of battle management for Source games.
===[[Squads]]===
===[[Squads]]===
Organise your NPCs into squads for increased efficiency and teamwork.
Organise your NPCs into squads for increased efficiency and teamwork. Squads will share information on their surroundings and take turns covering each other.
===Miscellaneous===
===Miscellaneous===
Other components including relationships, speech, and more.
Other components including relationships, speech, and more.

Revision as of 22:19, 9 July 2005

AI stands for Artificial Intelligence (Wikipedia) and controls the behaviour of all but the simplest of NPC actions in the Source engine. Regardless of how easily you might have torn through the Combine it won't be long after you start working with Source's AI that you recognise its power, intelligence and flexibility. This introductory guide will give you a brief overview of the AI from the implementation perspective. Please be aware that there is currently no official AI documentation: nearly everything you see in this category was researched and written by the community. This means mistakes and omissions are inevitable.

Map Components

The following are all entities or groups of entities a level designer might place in a map to manipulate the AI. A map doesn’t require any of them for the AI to function, but the more the better.

Nodes

These give the AI bearing in the world besides other NPCs or the player. They are required for all but the simplest of AI actions. When combined, these nodes form a roadmap of sorts for NPCs, or a node graph.

Path_corners

The most direct way of influencing AI is through the path_corner entity. It bluntly instructs the NPC to go to it, and they do so in the most direct manner possible.

Goals

Goals give the AI a task to fulfill in a semi-scripted manner. For example, a metrocop guarding a doorway.

Hints

Hints give AI contextual pointers that it would not be able to work out on it’s own: areas safe to crouch and reload, objects of interest, or even places for birds to perch.

Assaults

Assaults are the less scripted and combat orientated sisters of path_corners. Use them to move NPCs while retaining their tactical routines.

Standoffs (Battle Lines)

Standoffs give AI the specific instruction to fight hostiles. When in a standoff, NPCs will cooperate in holding certain areas while advancing into others. Standoffs are a method of battle management for Source games.

Squads

Organise your NPCs into squads for increased efficiency and teamwork. Squads will share information on their surroundings and take turns covering each other.

Miscellaneous

Other components including relationships, speech, and more.

General AI Events

<need to research events>