Princess Bot Documentation

Who is Princess Bot?

The TestBot was originally written several years ago as an example of how to create an AI for MegaMek.  As such, it's not terribly sophisticated, but it can provide a decent fight when commanding a handful of Introductory Tech units.  It does odd/silly things with some higher tech units.  Also, when commanding more than a half-dozen units, it slows down exponentially when attempting to determine which unit to move next.  You can get more details about the TestBot in the ai-readme.txt document.

The Princess Bot was written many years after in an attempt to create an AI that would process quicker even if it were slightly dimmer. Princess offers a few advantages over TestBot.  First, Princess is still being maintained, though not by the original author.  Princess is actually faster at determining which unit to move next, however, she is slower at moving fast units (VTOLs & Hovercraft especially).  She is able to operate AeroSpace units on the ground map, which TestBot cannot, but it takes a long time for her to crunch the numbers and she still can't handle anything on the space maps.  Also, she's not very competent with Infantry, which she seriously undervalues.  One of the biggest advantages of Princess, however, is that her behavior can be modified in a number of ways, which you'll see throughout this document.

Princess Bot Configuration

The Princess Bot has a number of settings to play with.

Behavior - There are 4 behaviors pre-configured with Princess:

  • DEFAULT - Basic "balanced" settings.

  • BERSERK - Highly aggressive.  Princess will ignore danger to herself and will not run away under any circumstances.

  • COWARDLY - Really doesn't want to get shot.

  • ESCAPE - Not quite as fearful as cowardly but she will try to escape from her home board edge ASAP.

You can also enter a name to save your own configurations for later games or for use with the replacePlayer command.

Verbosity - Used to set the level of logging Princess will use.  DEBUG mode is very verbose.  It is recommended you only use it when trying to debug something specific.

Forced Withdrawal  - Used to make the Princess follow the Forced Withdrawal rules outlined in Total Warfare.

Immediate Withdrawal - Used to make Princess send her units to her home edge from the start of the game, regardless of damage level. This can be handy for Chase and Breakthrough scenarios.

Auto Flee Board - (Only available when Immediate Withdrawal is in effect.) If this is checked, Princess will issue the Flee command as soon as her units reach her home edge, regardless of damage level.

Home Edge - Defines which edge Princess will attempt to flee across when Forced Withdrawal is in effect.

Aggression - This determines how much Princess wants to close with her enemies.  Lower settings will cause her to try to keep her distance more, while higher settings will have her get right up in her enemies' faces.

Bravery - This determines how much return fire Princess is willing to risk in order to do damage to the enemy.

Herding - The higher this value, the more Princess will try to keep her units together.

Piloting Caution - This determines how willing Princess is to fail a piloting roll and fall on her face when attempting various maneuvers.  Higher settings means that Princess will risk fewer piloting rolls.  Note, this also affects how willing she is to use MASC or try to move through or on buildings.

Self Preservation - This determines how quickly Princess will flee once Forced Withdrawal takes effect.  At lower levels, she will attempt more of a fighting withdrawal, while at higher levels she should run straight for her home edge.

Strategic Targets - This allows you to provide Princess with a list of hex coordinates or unit ids to move to and attack.  If a building exists in a target hex, then she will attempt to destroy that building. If a unit with the given id is on the enemy team, she will give that target a higher priority.

Chat Commands

Chat commands can only be given to an allied Princess player (on the same team).

Flee
princessName: flee
Causes princess-controlled units to start fleeing the board, regardless of damage level or Forced Withdrawal setting.

Verbose
princessName: verbose : <error/warning/info/debug>
Sets princess's verbosity level.

Behavior
princessName: behavior : behaviorName
Change's princess's behavior to the named behavior.

Caution
princessName: caution : <+/->
Modifies princess's Piloting Caution setting. Each '+' increases it by 1 and each '-' decreases it by one.

Avoid
princessName: avoid : <+/->
Modifies princess's Self Preservation setting. Each '+' increases it by 1 and each '-' decreases it by one.

Aggression
princessName: aggression : <+/->
Modifies princess's Aggression setting. Each '+' increases it by 1 and each '-' decreases it by one.

Herding
princessName: herd : <+/->
Modifies princess's Herding setting. Each '+' increases it by 1 and each '-' decreases it by one.

Bravery
princessName: brave : <+/->
Modifies princess's Bravery setting. Each '+' increases it by 1 and each '-' decreases it by one.

Target
princessName: target : hexNumber
Adds the specified hex to princess's list of Strategic Targets.

Prioritize
princessName: prioritize : unitId
Adds the specified unit to princess's Priority Targets list.

Replacing an Absent Player with the Princess Bot

If a player has become disconnected (the word "(ghost)" appears next to their name, you can replace that player with a bot.  To use Princess as the replacement, issue the following command in the chat window:

    /replacePlayer -b:Princess <-c:ConfigName> <-v:VerbosityLevel> <-p:>PlayerName

Princess will replace the named player.
<-b> Specifies the use of Princess. If left out, TestBot will be used instead.
<-c> Specifies a saved configuration to be used by Princess. If left out DEFAULT will be used.
<-v> Specifies the verbosity level used to log Princess (DEBUG/INFO/WARNING/ERROR). If left out, ERROR will be used.
<-p> Specifies the player to be replaced. The "-p:" is only required with the "-c:" or "-v:" parameters are also used.

Princess-Compatible Optional Rules

The following are the optional rules that should be safe to use when playing against Princess. Anything not on this list will either cause Princess to behave on nonsensical ways (always Sprinting or Leaping) or can cause crashes/lockups (mech/vehicle lance movement). So, it is not recommended you use any rules not on this list when using Princess.

If there is an optional rule you would like Princess to support, file a Feature Request:
https://sourceforge.net/p/megamek/feature-requests/?source=navbar

Basic


Victory Conditions

Any will work, but Princess isn't really aware of them. This means that she'll use the same strategy no matter the VC.


Allowed Units and Equipment


Advanced Rules


Advanced Combat


Advanced Ground Movement


Advanced Aerospace Rules (Princess only works on ground maps)


Initiative Rules


RPG Related