AI Programming Overview: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (small summary describing RunAI())
Line 1: Line 1:
[[Category:AI]][[Category:Programming]]
[[Category:AI]][[Category:Programming]]


I am by no means an expert on NPC's but I will give it my best shot here to explain what I currently know, since there is nothing here anyway, it's better to have something. I hope this contribution of mine may evolve into a correct and concise overview of the Source AI implementation.
Each time the NPC think's with <code>NPCThink()</code> a core method is run <code>RunAI()</code>.
--[[User:Fluxtah|fluxtah]] 13:06, 3 Aug 2005 (PDT)
 
<code>RunAI()</code> gathers the NPC's current [[Conditions]] according to it's environment and determines the best [[States|State]] it should be in, any kind of logic can influence the NPC's conditions and state including the things it sees or the sounds it hears.
 
The NPC will then determine the best [[Schedules|Schedule]] to run for the given conditions and state, it will maintain any current schedules or interrupt them and run more appropriate schedules to those given conditions and state.
 
The following links describe states, conditions, schedules and tasks in more detail.


[[States]]
[[States]]

Revision as of 01:31, 4 August 2005


Each time the NPC think's with NPCThink() a core method is run RunAI().

RunAI() gathers the NPC's current Conditions according to it's environment and determines the best State it should be in, any kind of logic can influence the NPC's conditions and state including the things it sees or the sounds it hears.

The NPC will then determine the best Schedule to run for the given conditions and state, it will maintain any current schedules or interrupt them and run more appropriate schedules to those given conditions and state.

The following links describe states, conditions, schedules and tasks in more detail.

States

Conditions

Schedules

Tasks

Stub

This article or section is a stub. You can help by expanding it.