Editing Halo 3 Engine

From Halopedia, the Halo wiki

You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 9: Line 9:
Individual tasks can "turn themselves on and off"; when a high-priority task is turned on, squad members are reassigned as necessary to ensure its completion. When a task is completed (and turned off), the squad members that were working on it are reassigned to any other tasks that need completion.
Individual tasks can "turn themselves on and off"; when a high-priority task is turned on, squad members are reassigned as necessary to ensure its completion. When a task is completed (and turned off), the squad members that were working on it are reassigned to any other tasks that need completion.


An example{{Ref/Reuse|bnetpub-betterbattle}} is the task of guarding an indoor environment. This task is broken into sub-tasks (such as guarding a main entrance and guarding a hallway). These sub-tasks are assigned priorities ("The most important thing is to guard the door, but if you can, also guard the hallway"), and each is broken into additional sub-tasks ("Guarding the hallway means guarding the front, the middle and the rear of the hallway.").
An example<ref name="bnetpub-betterbattle"/> is the task of guarding an indoor environment. This task is broken into sub-tasks (such as guarding a main entrance and guarding a hallway). These sub-tasks are assigned priorities ("The most important thing is to guard the door, but if you can, also guard the hallway"), and each is broken into additional sub-tasks ("Guarding the hallway means guarding the front, the middle and the rear of the hallway.").


In addition to specific task trees, there are also three general stages of battle: advance, retreat, and make a last stand.{{Ref/Reuse|bnetpub-betterbattle}}
In addition to specific task trees, there are also three general stages of battle: advance, retreat, and make a last stand.<ref name="bnetpub-betterbattle"/>


===Behavior trees===
===Behavior trees===
The behaviors of an individual AI-controlled combatant are also represented as tree structures where each [[Wikipedia:Node (computer science)|node]] is a self-describing behavior, such as "throw [[grenade]]" or "[[melee]]".{{Ref/Reuse|bnetpub-betterbattle}} The [[Wikipedia:Tree (data structure)#Terminology|root node]] of the tree is simply the beginning of a combatant's decision-making process. That node's children are the general tasks that the combatant is performing ("hide", "fight", etc.). Those nodes' children are specific behaviors. An example{{Ref/Reuse|bnetpub-betterbattle}} behavior tree can be represented with a multi-level bulleted list:
The behaviors of an individual AI-controlled combatant are also represented as tree structures where each [[Wikipedia:Node (computer science)|node]] is a self-describing behavior, such as "throw [[grenade]]" or "[[melee]]".<ref name="bnetpub-betterbattle"/> The [[Wikipedia:Tree (data structure)#Terminology|root node]] of the tree is simply the beginning of a combatant's decision-making process. That node's children are the general tasks that the combatant is performing ("hide", "fight", etc.). Those nodes' children are specific behaviors. An example<ref name="bnetpub-betterbattle"/> behavior tree can be represented with a multi-level bulleted list:


*Make a decision
*Make a decision
Line 30: Line 30:


===The specific algorithm===
===The specific algorithm===
The specific algorithm has been described as:{{Ref/Reuse|bnetpub-betterbattle}}
The specific algorithm has been described as:<ref name="bnetpub-betterbattle"/>
#Consider a subtree fragment
#Consider a subtree fragment
#Determine which children [tasks] are active
#Determine which children [tasks] are active
Line 42: Line 42:
#Iterate to next "priority group"
#Iterate to next "priority group"


In mathematical notation, the squads are expressed{{Ref/Reuse|bnetpub-betterbattle}} as a [[Wikipedia:Set|set]] <var>S</var> with <var>n</var> members; the tasks are expressed as a set <var>T</var> with <var>m</var> members. Bungie's goal was to find a mapping <var>F</var>(<var>S</var>)→<var>T</var> -- in other words, Bungie needed a function (<var>F</var>) that would effectively assign squads to tasks. There were two parts to this function: the developers needed to respect all task-capacity constraints and minimize the cost function <var>H</var>(<var>F</var>) -- in other words, they needed to avoid assigning too many squads or personnel to a task, and they needed to make the function (<var>F</var>) as efficient as possible (with <var>H</var> measuring how much it "cost" to use <var>F</var>). The first part of that problem (respecting task-capacity constraints) was referred to as "bin-packing".{{Ref/Reuse|bnetpub-betterbattle}}
In mathematical notation, the squads are expressed<ref name="bnetpub-betterbattle"/> as a [[Wikipedia:Set|set]] <var>S</var> with <var>n</var> members; the tasks are expressed as a set <var>T</var> with <var>m</var> members. Bungie's goal was to find a mapping <var>F</var>(<var>S</var>)→<var>T</var> -- in other words, Bungie needed a function (<var>F</var>) that would effectively assign squads to tasks. There were two parts to this function: the developers needed to respect all task-capacity constraints and minimize the cost function <var>H</var>(<var>F</var>) -- in other words, they needed to avoid assigning too many squads or personnel to a task, and they needed to make the function (<var>F</var>) as efficient as possible (with <var>H</var> measuring how much it "cost" to use <var>F</var>). The first part of that problem (respecting task-capacity constraints) was referred to as "bin-packing".<ref name="bnetpub-betterbattle"/>


The cost function (<var>H</var>(<var>F</var>)) gave Bungie "a basis for choosing one distribution over another".{{Ref/Reuse|bnetpub-betterbattle}} Basically, not every member of a squad will be performing the same tasks or behaviors in a given situation. Different tasks and behaviors will be distributed amongst the squad's members. Bungie needed a way to choose between two different distributions. The cost function allows the game to weigh different concerns—for example, the squads "don't want to travel far" but do "want to act coordinated" and "get near the player".{{Ref/Reuse|bnetpub-betterbattle}} The only danger in attempting to minimize <var>H</var>(<var>F</var>) is that "AI can look really stupid with [the] wrong <var>H</var>(<var>F</var>)".
The cost function (<var>H</var>(<var>F</var>)) gave Bungie "a basis for choosing one distribution over another".<ref name="bnetpub-betterbattle"/> Basically, not every member of a squad will be performing the same tasks or behaviors in a given situation. Different tasks and behaviors will be distributed amongst the squad's members. Bungie needed a way to choose between two different distributions. The cost function allows the game to weigh different concerns—for example, the squads "don't want to travel far" but do "want to act coordinated" and "get near the player".<ref name="bnetpub-betterbattle"/> The only danger in attempting to minimize <var>H</var>(<var>F</var>) is that "AI can look really stupid with [the] wrong <var>H</var>(<var>F</var>)".


The "greedy approach" to this system, expressed in [[Wikipedia:pseudocode|pseudocode]], is:{{Ref/Reuse|bnetpub-betterbattle}}
The "greedy approach" to this system, expressed in [[Wikipedia:pseudocode|pseudocode]], is:<ref name="bnetpub-betterbattle"/>
  while (S is not empty)
  while (S is not empty)
     find pair (s,t) that give the minimum H(s,t) for all S x T
     find pair (s,t) that give the minimum H(s,t) for all S x T
Line 57: Line 57:
     end
     end


Refinements have also been made to that system; some are listed below.{{Ref/Reuse|bnetpub-betterbattle}}
Refinements have also been made to that system; some are listed below.<ref name="bnetpub-betterbattle"/>
;Filters
;Filters
:Particular tasks are only available to specific types of personnel. For example, only [[Jiralhanae|Brutes]] can drive [[Type-26 Ground Support Aircraft|Banshees]], and only [[Kig-yar|Jackals]] can act as [[Sniping|snipers]].
:Particular tasks are only available to specific types of personnel. For example, only [[Jiralhanae|Brutes]] can drive [[Type-26 Ground Support Aircraft|Banshees]], and only [[Kig-yar|Jackals]] can act as [[Sniping|snipers]].

Please note that all contributions to Halopedia are considered to be released under the Attribution-ShareAlike 3.0 Unported license (see Halopedia:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

To view or search uploaded images go to the list of images. Uploads and deletions are also logged in the upload log. For help including images on a page see Help:Images. For a sound file, use this code: [[Media:File.ogg]].

Do not copy text from other websites without permission. It will be deleted.

Templates used on this page: