Changes between Initial Version and Version 1 of Quagents AINodes


Ignore:
Timestamp:
Jun 1, 2011 10:27:01 AM (13 years ago)
Author:
jpawlick
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Quagents AINodes

    v1 v1  
     1Under the hood all behaviors are implemented as AINodes.
     2
     3Each Bot in Q3A has an active AINode at all times. An AINode is a function that takes a botstate and implements a certain behavior. They basically represent states in a finite state machine, and contain instructions for what to do while the bot is in that state. More information about the default AINodes in Q3A can be found at http://dev.johnstevenson.co.uk/bots/20585341-The-Quake-III-Arena-Bot.pdf, chapter 15.
     4
     5The built in Q3 AINodes all return qtrue or qfalse (indicating whether to continue running the AINode loop), but Quagents AINodes may return more codes to signal termination behaviors to the command parser. FIXME: This is probably a bad idea - better to pass the socket and write permissions down to the AINodes?
     6
     7Quagents do not use any of the built-in AINodes, since all these behaviors are tailored to playing Quake. The following is a list and description of Quagents AINodes. Throughout the Quake code, you will find that Quagents AINodes are prefixed with a "G" for quaGent. The source for all these is contained in code/game/ai_quagentsnodes.c. Generally these nodes will have a one-to-one correspondence with commands in [[ProtocolZero]].
     8
     9In this file, lines prefixed with an "@" are yet to be implemented.
     10
     11== AINode_GDoNothing ==
     12Users should not be concerned about DoNothing - it is used behind-the-scenes only when there are no standing orders. A user seeking to enter DoNothing should issue a "forget_all_orders" command.
     13
     14== AINode_GWalkForever ==
     15This node sends the quagent walking forward at a speed of 400. The agent will stop before it walks off cliffs, into walls, or into slime or lava.
     16
     17@ When blocked, cancel behavior and report blocked.
     18
     19== AINode_GJumpOnce ==
     20This node asks the quagent to make a single forward jump. It still won't jump off cliffs, into walls, or into slime or lava, though.
     21
     22@ Report complete or report blocked.
     23
     24