This document describes the methods used in the OpenMortal artificial intelligence (AI). The AI is designed to play the game as any of the playable OpenMortal charaters, and can be used for demos or a single-player game.
Revision |
Date |
Author |
Description |
---|---|---|---|
1. |
2004-01-13 |
UPi |
Initial version, created for open discussion of
concepts |
This document assumes knowledge of the Toplevel Design, and the basic working of Doodads and Fighters (described in the scripts Doodad.pl and Fighter.pl)
The AI needs to comply with the following requirements:
The AI incorporates two distict steps: decision making and decision execution.
Decision making is not specific to any character (can perhaps be fine-tuned to suit individual characters, but this is unnecessary). It takes the current situation, represented by the Perl backend's internal state (Fighters' states, Doodads, etc), converts them to fuzzy variables (such as Distance and ThreatLevel), and comes up with a Decision.
The Decision is then fed to the decision execution, the second algorithm. This one has very good knowledge of the character's capabilities, and will carry out the decision based on this information.
DangerZone :- ( HorizontalRange, ThreatHeight,
DeltaT,
Cause (Fighter/Doodad) )
Distance: VeryNear, Near, OutOfReach, Far,
VeryFar (beyond jumpkick range), BehindMe
Position: Kneeling, Standing
ThreatLevel: RedAlert (will be in DangerZone "real soon"), YellowAlert (will be in DangerZone, but still have time), GreenAlert (will be in danger zone, but still plenty of time), BlueAlert (no threat)
ThreatHeight: AboveHead (mustn't jump), Middle (can be avoided by kneeling), Low (can be avoided by jumping)
ThreadSource: Fighter, Doodad
Decision: Wait, Block, Attack, JumpUp, JumpForward, JumpBackward, WalkForward, WalkBackward, KneelDown, StandUp, Attack, Projectile
[...]