Monster Rancher 2 Combo Breaker 2024 Live Tournament

Monster Rancher 2 Monster AI Processing

What goes into the game's AI that makes a monster choose what to do during a fight? SmilingFaces96 breaks down A.I. processing for Monster Rancher 2.

Background On Distance Parameters and Formulas

A battle takes place in a fixed arena length. Each monster’s in-arena-position is considered where its backside is currently at. The in-arena-position is in respect to the center of the arena, position 0. Each monster starts the battle at the same relative fixed position from the center. Each monster has a base length that is modified based on its current life stage length percentage. There are 3 life stage length percentages for battle: 70% (life stage 1-2), 90% (life stage 3-4), and 100% (life stage >4). There is an area between the monsters that will be referred to as a dead zone. The monsters can never physically get closer than the dead zone to each other.

  • Arena Length: 6000 (-3000 to 3000 position wise)
  • Monster 1 Start Position: -1950 (left)
  • Monster 2 Start Position: 1950 (right)
  • Dead Zone: 500
Monster TypeBase LengthMonster TypeBase LengthMonster TypeBase Length
Ape450Golem914Naga720
Arrow Head943Hare331Niton200
Bajarl332Henger364Phoenix650
Baku1150Hopper232Pixie125
Beaclon1160Jell460Plant550
Centaur450Jill565Suezo270
ColorPandora1138Joker783Tiger640
Dragon800Kato400Undine165
Ducken220Metalner280Worm820
Durahan375Mew250Wracky254
Gaboo540Mocchi250Zilla460
Gali220Mock873Zuum820
Ghost220Monol100*See Appendix for length sorted

 

M1/2_Mod_Length = Base Length x Life Stage Length Percentage
(MBD) Distance between Monsters: M2_Posiiton - M1_Position - Dead Zone - M1_Mod_Length - M2_Mod_Length
(M1ED/MED) Monster 1 Distance from Edge: 3000 + M1_Position
(M2ED/MED) Monster 2 Distance from Edge: 3000 - M2_Position
(MPD) Monster Push Distance: <= 50 MBD
(MT1D) Monster Technique Close Distance: <= 400 MBD
(MT2D) Monster Technique Short Distance: > 400 MBD to <= 1000 MBD
(MT3D) Monster Technique Middle Distance:  > 1000 MBD to <= 1800 MBD
(MT4D) Monster Technique Far Distance: > 1800 MBD to <= 2800 MBD

 

Background on Monster AI Selection Options

During battle, the Monster AI has 5 possible options.  Those 5 options are 1) Execute technique (EXECUTE), 2) PUSH BACK, 3) WAIT, 4) Move towards other monster (FORWARD), and 5) Move away from other monster (BACKWARD). Each option is executed to completion before choosing another option.  While executing options 3, 4, or 5, the monster will also adjust what techniques it currently has selected for each attacking range. While dodging an attack, the monster will pause its waiting or moving until the dodge is finished, then continue execution of the wait or move. The Monster AI selection is executed at a rate of 30 times a second, but will be interrupted during completion of attacks, push backs, foolery, and dodges.

 

Choosing Selected Techniques

As stated in the previous section, during the execution of the waiting or moving state, the monster AI will attempt to change its currently selected technique range or modify its currently selected technique for the currently selected range. Each time the monster is executing its move or waiting, there is a 12.5% chance that an attempt will be made to change the technique selected or technique range selected, with each option having an equal chance of execution.

There are 4 options for the monster when trying to select new techniques or ranges: 1) Move selected technique range to the right, 2) Move selected technique range to the left, 3) select next technique at currently selected range, or 4) select previous technique at currently selected range. Whether moving left, right, increasing or decreasing, the options will wrap around (i.e. changing selected technique ranges to the right will cause moving from far right to wrap around to the far left).

Choosing a technique at the currently selected range is pretty self-explanatory. If this option is selected, the technique at the currently selected attacking range will increase to the next technique or decrease to the previous technique if a technique is available to do so.

For choosing a technique attacking range, the range selected will only stop on ranges that have active techniques; therefore, the AI monster technique range selector should never stop on a range with no techniques.

 

Populating AI Options

Before executing an AI selected option, the options to choose from need to be determined for this selection moment. The possible options are populated based on the current monster’s position and the technique that it could potentially execute.

The first option that is populated is chosen based on the following criteria: Monster distance to edge (MED), Distance between monsters (MBD), and technique existence at current range.

  1. If MED < 100 AND MBD <= 50, then PUSH BACK is populated as the first option; otherwise, if no technique exists at the current range, then FORWARD is populated as the first option; otherwise, WAIT is chosen as the first populated option.
The next option that is populated is chosen based on the following criteria: Distance between monsters (MBD).
  1. If MBD > 0, then FORWARD is chosen as the next populated option; otherwise, nothing is chosen as the next option. Note: there could be two FORWARD choices in the populated options depending on how the first option was populated.
The next option that is populated is chosen based on the following criteria: Monster distance to edge (MED).
  1. If MED > 80, then BACKWARD is chosen as the next populated option; otherwise, nothing is chosen as the next option.
The next option that is populated is chosen based on the following criteria: Monster distance to edge (MED) and Distance between monsters (MBD).
  1. IF MED < 1500 AND MBD <= 50, then PUSH BACK is selected as the next option; otherwise, nothing is chosen as the next option. Note: there could be two PUSH BACK choices in the populated options depending on how the first option was populated.
The final options that are populated will all be EXECUTE and are chosen based on the following criteria: technique existence at current range, technique guts cost for technique at current range, monster life left, and monster guts. The amount of EXECUTE options that are populated as choices will be explained below followed by an example for both scenarios. The amount of EXECUTE options added can be zero, and will never exceed an amount that would cause all possible options to exceed a count of 16. For example, if based on the previous 4 populated option choices, only 3 were chosen, then the maximum amount of EXECUTE possible options that could be added would be 16 - 3 = 13.

If there is no technique at the current range or there are not enough guts to execute the current technique, then zero EXECUTE options will be populated as possible options.

  1. EXECUTE populate method #1: This method will be used if the current technique that is at the monster range is a life recovery technique that cannot do any guts damage or life damage to the opposing monster.
The number of EXECUTE options that will be added is calculated as follows (all divisions round down):
    Before Limit Amount = 10 + 2 x ( 10 x life_left_opp / start_life_opp ) - 3 x ( 10 x life_left / start_life )
Example: Opponent’s life left = 300, Opponent’s start life = 599, Life left = 240, Start life = 800
    Before Limit Amount = 10 + 2 x ( 10 x 300 / 599 ) - 3 x ( 10 x 240 / 800 )
    10 + 2 x ( 3000 / 599 ) - 3 x ( 2400 / 800 )
    10 + 2 x 5 - 3 x 3 -> 10 + 10 - 9 -> 11

Since 11 does not cause the amount of 16 possible options to be exceeded (since the maximum previous options selected cannot exceed 4 [4 + 11 = 15]), then 11 EXECUTE options will be added to possible AI options.

If the amount calculated above was <= 0, then zero EXECUTE options would have been added.

Observations: The greater life you have -> less options will be added; the greater the opponent’s life -> more options will be added. For every 10% of life you have left, 3 options will be subtracted. For every 10% of life your opponent has left, 2 options will be added.

  1. EXECUTE populate method #2: This method will be used if the current technique that is at the monster range will potentially do guts or life damage – this method will be used the most. The number of EXECUTE options that will be added is calculated as follows (all divisions round down):
  • If opponent monster is in foolery, then “Guts Factor = Guts - 25”; otherwise, “Guts Factor = Guts - 40”.
  • Before Limit Amount = Guts Factor / 5
Example: Guts = 94, Opponent monster is in foolery, previous chosen option count is 4
  • Before Limit Amount = (94 – 25) / 5 -> 69 / 5 -> 13
  • Since 13 causes the amount of 16 possible options to be exceeded (since the previous options selected count was 4 [4 + 13 = 17]), then 12 EXECUTE options will be added to possible AI options.
If the amount calculated above was <= 0, then zero EXECUTE options would have been added.

Observations: The greater guts the monster has, the more EXECUTE options it will have.

The option that is selected to run is randomly selected based on the small random number generator (0-255 order continuously repeats) from the options that were populated from the previous selection criteria.

  • Populating Options Example: The following options were populated as a result of the previous selection possibilities: WAIT, FORWARD, BACKWARD, EXECUTE, EXECUTE, EXECUTE; therefore
  • Percent Chance for each would then be: 16.6% WAIT, 16.6% FORWARD, 16.6% BACKWARD and 50% EXECUTE

 

Running Selected AI Option

  1. PUSH BACK – This option is pretty self-explanatory, the monster will execute a push back move.
  2. EXECUTE – The monster will first determine if foolery will activate. If foolery will activate, then the monster will be in FOOLERY; otherwise, the monster will execute the selected technique at the current range.
  3. WAIT – The monster will select between a 0, 1, or 2 second time delay, and then wait that amount of time. The number is chosen using the small random number generator.
  4. FORWARD – The monster will begin moving towards the opposing monster. A distance amount will be initialized based on BMD, then decremented by the monster’s Arena Movement Rate every Monster AI execution until the amount is less than or equal to 0. At that time the monster will stop moving.
    1. % is the modulo/remainder function
    2. LRN = Large Random Number (0-32767, next value can be the same)
    3. Initial Move Value = (LRN % (BDM / 64)) x 64 [round down]
      1. Example: LRN = 33, BDM = 1000, Arena Movement Rate = 32
        Plug into formula -> (33 % ( 1000 / 64 )) x 64
        (33 % 15) x 64 -> 3 x 64 -> 192
      2. Number of steps taken = Initial Move Value / Arena Movement Rate = 192 / 32 = 6 steps [round up]
      3. Amount of time taken = 6 steps x 1 second /30 steps = 0.2 seconds
      4. Final distance traversed = 6 steps x 32 distance / step = 192 distance (equates to 3.2% of the arena)
  5. BACKWARD – The monster will begin moving away from the opposing monster. A distance amount will be initialized based on MED, then decremented by the monster’s Arena Movement Rate every Monster AI execution until the amount is less than or equal to 0. At that time the monster will stop moving.
    1. % is the modulo/remainder function
    2. LRN = Large Random Number (0-32767, next value can be the same)
    3. Initial Move Value = (LRN % (MED / 64)) x 64 [round down]
      1. Example: LRN = 900, MED = 700, Arena Movement Rate = 28
        Plug into formula -> (939 % ( 700 / 64 )) x 64
        (939 % 10) x 64 -> 9 x 64 -> 576
      2. Number of steps taken = Initial Move Value / Arena Movement Rate = 576 / 28 = 21 steps [round up]
      3. Amount of time taken = 21 steps x 1 second / 30 steps = 0.7 seconds
      4. Final distance traversed = 21 steps x 28 distance / step = 588 distance (equates to 9.8% of the arena)

 

Appendix – Monster Type Base Length sorted by base length

Monster TypeBase LengthMonster TypeBase LengthMonster TypeBase Length
Beaclon1160Jill565Suezo270
Baku1150Plant550Wracky254
ColorPandora1138Gaboo540Mew250
Arrow Head943Jell460Mocchi250
Golem914Zilla460Hopper232
Mock873Ape450Ducken220
Worm820Centaur450Gali220
Zuum820Kato400Ghost220
Dragon800Durahan375Niton200
Joker783Henger364Undine165
Naga720Bajarl332Pixie125
Phoenix650Hare331Monol100
Tiger640Metalner280

 

Appendix – Glossary of terms and Definitions

Arena Length: 6000 (-3000 to 3000 position wise)
Monster 1 Start Position: -1950 (left)
Monster 2 Start Position: 1950 (right)
Dead Zone: 500 -distance between monsters that cannot be crossed. This will be subtracted out when determining technique ranges and such.
M1ED/MED - Monster 1 Distance from Edge: 3000 + M1_Position
M2ED/MED - Monster 2 Distance from Edge: 3000 - M2_Position
MPD - Monster Push Distance: <= 50 MBD
MT1D - Monster Technique Close Distance: <= 400 MBD
MT2D - Monster Technique Short Distance: > 400 MBD to <= 1000 MBD
MT3D - Monster Technique Middle Distance: > 1000 MBD to <= 1800 MBD
MT4D - Monster Technique Far Distance: > 1800 MBD to <= 2800 MBD
LRN – Large Random Number (0-32767, next value can be the same)
SRN – Small Random Number (0-255, order continuously repeats)

Research by SmilingFaces96 - Original documentation here
This page was last modified: November 13 2023
LegendCup has been Ad-Free since 1999! Consider a Donation!
Can't donate? Help by Linking or Mentioning LC, anywhere Monster Rancher related!
もしこのサイトが役に立ったら、リンクとシェアをお願いします!
  • Thanks Tecmo! We Love Monster Rancher!
  • DISCLAIMER: LegendCup.com has been granted permission from Tecmo, in writing, for use of images and sounds throughout the site. All images and sounds related to Monster Rancher are property of Tecmo, inc. Legendcup.com and it's associates do not claim to own any of these properties, images, graphics or sounds. Reproduction of data on LegendCup is forbidden without written permission from LegendCup or their individual authors.
  • Please see the Legal page if there are any concerns.