Tactical AI: Difference between revisions
more stuff |
|||
| Line 63: | Line 63: | ||
==See Also== | ==See Also== | ||
[[ROUTES.DAT]] - the file that contains all route nodes on a saved tactical game. | [[ROUTES.DAT]] - the file that contains all route nodes on a saved tactical game. | ||
[[UNITREF.DAT]] - Specially the discussion on the Talk page of Offset 0x4A. | [[UNITREF.DAT]] - Specially the discussion on the Talk page of Offset 0x4A. | ||
[[Alien Inventory Use]] - what the AI does and does not use. | [[Alien Inventory Use]] - what the AI does and does not use. | ||
[[Alien movement patterns]] | [[Alien movement patterns]] | ||
Revision as of 19:17, 16 March 2012
AI Modes
The game's AI consists of four modes
- Patrol - the alien will travel between the battlefield nodes defined on the ROUTES.DAT file.
- Sniper - the alien will not move and will make a 360º turn to look for possible hostiles.
If the alien detects an enemy unit (X-COM or civilian) the AI will assess the situation, based on the alien's aggressiveness stats and will trigger its intelligence stat (it will remember the position of the unit for X turns, X being its intelligence value). The AI will then switch the alien's mode to one of the following.
- Combat - the alien will attack the human unit and/or try to find cover.
- Escape - the alien will flee the human unit, usually when it is unarmed or it is a higher rank (Leader, Commander, etc.) alien.
AI Actions
The AI will then order each unit to perform actions:
- Evaluating Mode
- GoUfo
- Guard
- Finding Route
- Moving
- Firing
- Attack Attempt
- Select Target
- Find Cover
- Partial Cover
- Final Facing
- Set Patrol Point (???)
- Find Fire Point (???)
Most of the actions are self-explanatory, but there's no clear explanation of how the AI considers 'Patrol' and 'Fire' points, although an hypothesis can be made from certain clues found on the ROUTES.DAT file.
Route Nodes
As mentioned before, the AI uses patrol routes for each individual map which define the route nodes and the links between them. The record for each node also contains indications on if an unit can spawn there, its type/rank but there are 2 bytes on each node record are unexplained so far. Daishiva's map view calls the first record the 'flags' byte and from several observations aliens tend to be attracted to move/stay on those locations.
According to this theory the aliens will choose a node with the higher value 'flag' when their AI is set for patroling/guarding, unless it is already occupied. The Battleship schematics above show some proof of this, specially on the bridge area (the aliens that start on the bridge room usually never come out except to have a look outside the door). Now look at the plants for the Supply Ship:
The ground and first level almost contains nodes with a 1 value, with a single exception - the 3 and 2 of the engine room.
Next one is the Abductor. Usually the aliens don't come out much and you find a large number of them on the main chamber on the ground, due to the concentration of 3/4s that acts as a bottleneck.
Now, what ever all of those those refer to Fire or Patrol points or both is undetermined. However, Laser Squad (the predecessor of Enemy Unknown) used prefixed maps with predetermined regions (each with different threat levels) and the presence enemy units would provoke an AI response. Thus it should make sense that the game uses the values above to determine some of the alien actions, although all of these is speculation based on possibly biased observations.
Other Interesting Bits
- After round 20 the location of all X-COM units becomes known to all the aliens and they automatically switch to Combat mode.
- "We made sure that there was an element of unpredictability in the AI which often made it seem more intelligent than it actually was." - Julian Gollop. The quote comes from this interview.
See Also
ROUTES.DAT - the file that contains all route nodes on a saved tactical game.
UNITREF.DAT - Specially the discussion on the Talk page of Offset 0x4A.
Alien Inventory Use - what the AI does and does not use.













