Check out the Monster Rancher Discord Server for anything from casual game conversation to community run tournaments!

Ultra Kaiju Monster Rancher
Research Data: AI Selection Processing for Battles


This document will describe how the monsters make decisions for battle while being automatically controlled. While the decision options are identical between the monsters, the thresholds for making the decisions are different. These thresholds are based on the monsters "Personality". For Ultraman characters though, the control is different because they have no personality defined in the game (ha ha ha). Just kidding, they have a personality of Brave, which makes great sense for Ultraman, but due to their unique techniques and movement will require their own specialized processing. An addendum to this document will be made at a later time for the Ultraman processing. See Appendix A to understand monster position in arena, movement speed, knockback, and dashing. See Appendix B for all "Personality" related percentages. See Appendix C for some Personality Percentage Analysis and Comments.

During the battle, the Monster AI makes a selection every frame, so a rate of 30 times a second. The monster has the following "Action State" options (initially set to No Decision): 0) No Decision, 1) Move Forward, 2) Move Backward, 3) Move to Target Range, 4) Use a Technique, 5) Knockback, and 6) Dash. All the options are pretty self-explanatory, except Move to Target Range which occurs when the monster gets too far out of range from the rival monster or has no Techs to use at the current range. Two timers are used and are updated every frame. The first timer is the "Use Tech Wait Duration" timer. It is a countdown timer, which when it reaches 0, allows the monster to use a tech. The second timer is the "New Decision Duration" timer. It is a count-up timer, and when it exceeds its threshold, the monster will stop its current course of action and choose a new one. The only action that continues to get executed after the decision actually is movement. All the other actions, except dash will cause the monster to wait at its current position until the duration is exceeded again. Due to the length of the action steps/processing decisions, both the Execute "Use Tech" and Execute "Tech Selection" will be covered in their Special processing part of the document. The word "End" will be used to indicate that no other decisions or logic will be executed.

So, basically, the logic works like this when it first starts. The AI makes a decision about using a tech at the current range. If it doesn’t, then it decides to move in a direction for a random amount of time, unless it decides to dash. Once the amount of time has expired, then it will decide on a new course of action depending on where it is at. The new course of action comes from one of the 7 action state options. If movement is not chosen as an option, then the delay for choosing a new option will be based on the last. Now, let’s get on to the AI Selection processing on the next page.

 

Monster AI Selection Processing Logic

Step A [Dashed and Confused]: Check to see if the Action State is DASH.
  1. If (DASH) yes, then check to see if monster is done Dashing
    1. If (Dashing) yes, then set Action State to NO DECISION and go to Step C.
    2. If (Dashing) no, then keep Action State as DASH, and End.
  2. If (DASH) no , then check to see if monster is Confused
    1. If (Confused) yes, then check if New Decision Duration Threshold has been Exceeded
      1. If (Exceeded) yes, then go to Step E.
      2. If (Exceeded) no, then execute "Tech Selection" and End.
  3. If (Confused) no, then go to Step B
Step B [Target Practice]: Check to see if the Action State is MOVE TO TARGET RANGE.
  1. If (State) yes, then check if (the Current Range has a Usable Tech [a usable tech is one that exists and the guts cost can be met]) AND (the Use Tech Wait Duration has Expired)
    1. If (Both Conditions) yes, then make a decision about attempting to use the tech at the current range
      [Note: it is possible to use a tech in a region before reaching the targeted control area].
      1. Determine the percent chance threshold for using the tech based on Personality, Tech Range, and Guts.
      2. Generate a random number and check the chance to be less than the threshold.
        1. If (Percent) yes, then check to see if the New Decision Duration Threshold has been exceeded and will change the monsters mind on using its tech.
          1. If (Change Mind) yes, then go to Step C.
          2. If (Change Mind) no, then set the Action State to NO DECISION, execute "Use Tech", and End.
        2. If (Percent) no, then continue to move to target range processing in Step B.3.
    2. If (Either Conditions) no, then move to target range processing in Step B.3.
  2. If (State) no, then go to Step C.
  3. Move towards the target range
    1. If the monster’s current position is less than the target control range, then move backwards
      1. After moving, check if the monster is against the arena wall
        1. If (Wall) yes, then check if the monster wants to dash
          1. Set the percent chance threshold for dashing to 10%
          2. Generate a random number and check the chance to be less than the threshold
            1. If (Percent) yes, check if the monster meets all the dashing requirements
              1. If (Dash) yes, then set the Dash Range, set the Action State to DASH, Execute a dash and End.
              2. If (Dash) no, then set the Action State to NO DECISION and End.
            2. If (Percent) no, then set the Action State to NO DECISION and End.
        2. If (Wall) no, then keep the action state as MOVE TO TARGET RANGE and End.
    2. If the monster’s current position is greater than the target control range, then move forwards, keep the action state as MOVE TO TARGET RANGE and End.
    3. If the monster’s current position is within the target control range, then set the action state to NO DECISION, and move to Step C.
Step C [Can a Decision Be Made]: Check to see if the New Decision Duration Threshold (initial value is 0) has been exceeded
  1. If (Duration Exceeded) yes, then check to see if the monster meets all the knockback requirements
    1. If (Knockback) yes, then make a decision about attempting to knockback
      1. Determine the percent chance threshold for knockback based on Personality
      2. Generate a random number and check the chance to be less than the threshold.
        1. If (Percent) yes, then set the Action State to NO DECISION, reset the New Decision Duration Timer, Execute a Knockback, Execute "Tech Selection" and End.
        2. If (percent) no, then go to step D.
    2. If (Knockback) no, then go to step D.
  2. If (Duration Exceeded) no, then check to see if the Action State is MOVE FORWARD or MOVE BACKWARD
    1. If (MOVE) yes, then move accordingly, execute "Tech Selection", and End.
    2. If (MOVE) no, then execute "Tech Selection" and End.
Step D [Swing Away]: Check if (the Current Range has a Usable Tech) AND (the Use Tech Wait Duration has Expired)
  1. If (Both Conditions) yes, then make a decision about attempting to use the tech at the current range
    1. Determine the percent chance threshold for using the tech based on Personality, Tech Range, and Guts.
    2. Generate a random number and check the chance to be less than the threshold.
      1. If (Percent) yes, then set the Action State to NO DECISION, reset the New Decision Duration Timer, execute "Use Tech" and End.
      2. If (Percent) no, then go to Step E.
  2. If (Either Conditions) no, then go to Step E.
Step E [Footloose]: Check to see if a decision can be made to move forward or backward
  1. Determine the percent chance threshold for moving forward and for moving backward based on Personality
  2. Generate a random number for both directions and check the chance to be less than either of the thresholds.
    1. If (Either Percent) yes, then check which percent move chance was met
      1. If (Both) yes, check to see which direction should be chosen
        1. Set the percent chance threshold to move forward to 50%
        2. Generate a random number and check the chance to be less than the threshold
          1. If (Percent) yes, then go to Step E.2.a.ii (Forward only)
          2. If (Percent) no, then go to Step E.2.a.iii (Backward only)
      2. If (Forward Only) yes, then set Action State to MOVE FORWARD, reset the New Decision Duration Timer, set the New Decision Duration Threshold from a randomly chosen value between minimum and maximum values based on Personality and Movement direction, execute "Tech Selection", and End.
      3. If (Backward Only) yes, then set Action State to MOVE BACKWARD, reset the New Decision Duration Timer, set the New Decision Duration Threshold from a randomly chosen value between minimum and maximum values based on Personality and Movement direction, execute "Tech Selection", and End.
    2. If (Both Percent) no, then go to Step F if not confused; otherwise, Execute "Tech Selection" and End.
Step F [Dashing All the Way]: Check to see if a decision can be made to Dash
  1. Set the percent chance threshold for dashing to 2%
  2. Generate a random number and check the chance to be less than the thresholds
    1. If (Percent) yes, check if the monster meets all the dashing requirements
      1. If (Dash) yes, then set the Dash Range, set the Action State to DASH, Execute a dash, Execute "Tech Selection" and End.
      2. If (Dash) no, then set the Action State to NO DECISION, Execute "Tech Selection" and End
    2. If (Percent) no, then go to Step G.
Step G [Are We There Yet]: Check to see if a decision can be made to Target a Range
  1. Set the percent chance threshold for Targeting to 75%
  2. Generate a random number and check the chance to be less than the threshold
    1. If (Percent) yes, then check if (the Current Range is a Tech Range) and (the Current Range has Available Techs)
      1. If (Both Conditions) yes, then set the Action State to NO DECISION, Execute "Tech Selection" and End.
      2. If (Either Condition) no, then randomly set a Target Range from the Tech Ranges that have Techs, set the Action State to MOVE TO TARGET RANGE, reset the New Decision Duration Timer, Execute "Tech Selection" and End.
    2. If (Percent) no, then set the Action State to NO DECISION, Execute "Tech Selection" and End.

 

Use Tech Processing

  1. Check to see if the technique at the current range has any life steal or life recovery capability
    1. If (capability) yes, then check to see if starting life equals current life
      1. If (equal) yes, then attempt to select the previous tech at the current range if possible and End.
      2. If (equal) no, then go to step 2
    2. If (capability) no, then go to step 2
  2. Set the "Use Tech Wait Duration" to a random value between 1 1/6 and 3 seconds and go to step 3.
  3. Set the in game Use Tech flag that will cause the monster to attempt the technique at the current range.

 

Tech Selection Processing

Tech selection describes how the monster determines what techniques are selected for use in each of the tech ranges. The AI will first evaluate the techs at the current range, and then maybe move on to a different range for the next time Tech selection is executed.
  1. Check if a decision will be made to select the previous tech at the currently selected range
    1. Determine the percent chance threshold for selecting the previous tech based on Personality.
    2. Generate a random number and check the chance to be less than the threshold
      1. If (Percent) yes, then select the previous tech if one exists and go to Step 2.
      2. If (Percent) no, then go to Step 2.
  2. Check if a decision will be made to select the next tech at the currently selected range
    1. Determine the percent chance threshold for selecting the next tech based on Personality.
    2. Generate a random number and check the chance to be less than the threshold
      1. If (Percent) yes, then select the next tech if one exists and go to Step 3.
      2. If (Percent) no, then go to Step 3.
  3. Check if a decision will be made to select a closer range
    1. Determine the percent chance threshold for selecting a closer range based on Personality.
    2. Generate a random number and check the chance to be less than the threshold
      1. If (Percent) yes, then select the next closest range (wrap around from Melee to Long), go to Step 4.
      2. If (Percent) no, then go to Step 4.
  4. Check if a decision will be made to select a farther range
    1. Determine the percent chance threshold for selecting a farther range based on Personality.
    2. Generate a random number and check the chance to be less than the threshold
      1. If (Percent) yes, then select the next farthest range (wrap around from Long to Melee).
      2. If (Percent) no, then do nothing.

 

Appendix A – Distance, Movement, Knockback, and Dashing

  1. Background on Distance and Formulas
  2. Comments on Movement Speed and Distance units
  3. Knockback Determination and Results
  4. Dash Determination and Results
Background On Distance and Formulas

A battle takes place in a fixed arena length. Each monster’s in-arena-position is considered where its back 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. 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. Each monster has a base length that stays constant during its lifetime.

General Values – These are the values used to define the general setup for battle

  • (AL) Arena Length: 1200.0 (-600.0 to 600.0)
  • (M1P/MP) Monster 1 Position: Starting Position: -195.0
  • (M2P/MP) Monster 2 Position: Starting Position: 195 .0
  • (MS1/MS2) Monster Size: 65.0 (Reicubas), 65.0 (Thunder Killer), 60.0 (Suezo), 50.0 (Everyone Else)
  • (MDZ) Dead Zone: 100.0

Formulas – These formulas help define how the ranges and controls are determined

  • (MBD) Distance between Monsters from front including Dead Zone: (M1P - MS1) + (M2P - MS2)
  • (MZD) Distance between Monsters from front excluding Dead Zone: (M1P - MS1) + (M2P - MS2) - MDZ
  • (M1ED/MED) Monster 1 Distance from back to Arena Edge: 600 + M1P
  • (M2ED/MED) Monster 2 Distance from back to Arena Edge: 600 - M2P

Technique Ranges – These are the ranges that techniques can be used in

  • (MTR1/MTR) Monster Melee Range: 100 <= MBD < 180
  • (MTR2/MTR) Monster Close Range: 180 <= MBD < 300
  • (MTR3/MTR) Monster Middle Range: 300 <= MBD < 460
  • (MTR4/MTR) Monster Long Range: 460 <= MBD < 660
  • (MTRO/MTR) Monster Out of Range: MBD >= 660

Target Control Ranges – These are the ranges and values that monsters are controlled to

    (MCR1/MCR) Monster Melee Controlled Range: 120 <= MBD <= 160 (MCR2/MCR) Monster Close Controlled Range: 210 <= MBD <= 270 (MCR3/MCR) Monster Mid Controlled Range: 300 <= MBD <= 420 (MCR4/MCR) Monster Long Controlled Range: 510 <= MBD <= 610

Knockback and Dash Ranges – These are the values that affect Knockback (Push) and Dash
(KRZ) Knockback Range Zone: 100 <= MBD <= 110 (MZD <= 10)
(D1R) Dash 1 Range - 180 <= MBD < 300(D1T) Dash 1 Range Target Position - MBD = 140
(D2R) Dash 2 Range - 300 <= MBD < 460(D2T) Dash 2 Range Target Position - MBD = 240
(D3R) Dash 3 Range - 460 <= MBD < 660(D3T) Dash 3 Range Target Position - MBD = 380
(D4R) Dash 4 Range - MBD >= 660(D4T) Dash 4 Range Target Position - MBD = 560

Ultra Kaiju Monster Rancher AI range determination

Comments on Movement Speed and Distance units (fun anecdote about movement)

Distance in the game is hard to relate to because we have no units to determine its length. For the purposes of this section though we will make an assumption that the units for distance are in meters. An average human man walks at a speed of 1.42 meters/second with a height of 1.765 meters, so a 1.24 height to walking speed ratio. If Gomora as defined by the Ultraman TV series was 40 meters tall, then we can make a guess that it would walk at a rate of 40 meters / 1.24 height to speed ratio to get a speed of 32.2 meters/second.

Let’s see how this relates to Gomora’s in game speed definition. Gomora moves at a rate of 2.2 distance/time. If we assume distance is in meters, then what is the time? Well the game does give us some information for this. Every time the monster moves, a frame passes by, and since the frame rate is at a speed of 30 frames per second as well all conversions from seconds to a time duration in the game are a multiplication of 30, we can safely assume and determine that if we multiply the movement speed by 30, we will get it in terms of distance per second. Since we assumed that distance was in meters and time was in terms of 1 frame, then translating 2.2 to usable units gives us 2.2 x 30 which equals 66 meters/second.

So, are we off on 66 meters/second in game movement versus 32.2 meters/second guesstimated walking speed for good old Gomora. I don’t think so, because if I was in a battle against some giant terrible monster, I think I would be moving twice as fast. At any rate, whatever distance units you would like to use will work, since we know the arena length, we can relate all movement to it. Below is a chart showing all the different movement speeds used by the game.

One final comment above movement speed before the chart: There are two defined movement speeds in the game, a forward movement and a backwards movement. All monsters have the same forward and backwards movement. Generated monsters can have a maximum of 4.0 and a minimum of 2.0 movement speed. Only Ultraman characters actually have a different forward and backwards movement. Ultraman forward movement is 5.2 and backwards movement is 2.0.

CategoryBase
Move Value
Movement
per Sec.
% of Arena
Length per Sec
Slow2605.00%
Slow2.1635.30%
Slow2.2665.50%
Slow2.3695.80%
Sluggish2.4726.00%
Sluggish2.5756.30%
Sluggish2.6786.50%
Normal2.7816.80%
Normal2.8847.00%
Normal2.9877.30%
Quick3907.50%
Quick3.1937.80%
Quick3.2968.00%
Fast3.3998.30%
Fast3.41028.50%
Fast3.51058.80%
Fast3.61089.00%
Fast3.71119.30%
Fast3.81149.50%
Fast3.91179.80%
Fast412010.00%
(Super) Fast5.215613.00%

Knockback Determination and Results

A knockback can occur if the rival monster’s back position is at least 80 away from the arena’s edge and the distance between the monsters is less than or equal to 110 MBD (10 MZD). If a knockback is executed, then the rival’s position knockback zone will be determined. The zone will be based upon the rival’s position from the arena’s edge as defined in the knock back distance definitions below. Once the zone is determined, then the knockback distance will be calculated. If the zone is 4, then the knockback distance will be randomly chosen from distances 2, 3, or 4. If the zone is 3, then the knockback distance will be randomly chosen between distances 2 or 3. If the zone is 2, then the knockback distance will be 2. If the zone is 1, then the knockback distance will be the rival’s distance from the edge.
Knock Back Quick Reference Ranges - These are the values that define Knockback
(KRZ) Knockback Range Zone: MBD <= 110(RPKZ) Rival Position Knockback Zone: MED > 80
(KD1) Knockback Distance 1: MED(RPZ1) Rival Position Zone 1: MED <= 240
(KD1) Knockback Distance 2: 230 (19.2% of Arena)(RPZ2) Rival Position Zone 2: 240 < MED <= 440
(KD2) Knockback Distance 3: 430 (35.8% of Arena)(RPZ3) Rival Position Zone 3: 440 < MED <= 640
(KD3) Knockback Distance 4: 630 (52.5% of Arena)(RPZ4) Rival Position Zone 4: MED > 640

Ultra Kaiju Monster Rancher AI knockback determination

Dash Determination and Results A dash can occur if the monster has at least 10 guts and is in Tech Range 2, 3, 4 or Out of Range. If a dash is executed, then the monster will lose 10 guts and increase its movement speed to 3x its normal speed and move until it is within 10 of the mid-point of the next closest range. To maximize the distance gained, it is best to wait until you are in the back half of the range.

Ultra Kaiju Monster Rancher AI range determination

 

Appendix B – Monster Personality Percentages

Personality Use Tech < 50 Guts Use Tech >= 50 Guts Knock
Back
Range Select Tech Select Move
Fwd
Fwd
Min
Fwd
Max
Move
Bwd
Bwd
Min
Bwd
Max
TR1TR2TR3TR4TR1TR2TR3TR4CloserFartherNextPrev
%%%%%%%%%%%%%%SecSec%SecSec
Brave4040404040404040102.452.452.252.25200.751150.751
Calm551030551060102.452.452.252.25100.751300.751
Carefree5530555605102.452.452.252.25130.751150.751
Cautious111120202020121.751.752.252.25130.751170.751
Cool555510101010102.452.452.252.25100.751100.751
Earnest1515151550505050102.452.452.252.25150.751150.751
Easygoing55557777101.051.050.750.7540.75140.751
Fiery20207740407722.452.452.252.25300.751.2100.750.9
Honest1515151530303030102.52.522100.751100.751
Hot-Cold502055502055152.452.452.252.2550.751150.751
Lazy3333555550.350.350.750.7520.75120.751
Liberated20306666201583.153.151.51.5200.751200.751
Lively4040404050505050102.452.452.252.25300.751300.751
Naughty7305576055102.452.452.252.25150.751130.751
Nervous5050505050505050103.53.57.57.5300.751300.751
Obedient77777777102.452.452.252.25150.751150.751
Prodigy1010101020202020102.452.452.252.25150.751150.751
Rivalrous404040405555102.452.452.252.25150.751150.751
Rowdy303055606055102.452.452.252.25180.751.2150.751
Selfish3030303030303030105.255.2511.2511.25150.751150.751
Slow5555777751.751.751.51.5100.751100.751
Sociable151544404044102.452.452.252.25150.75150.751
Spoiled151515103030302052.452.452.252.25200.751.5150.751
Stubborn5055550555102.452.452.252.25250.91.5100.751
Tenacious2020202040404040102.452.452.252.25150.751150.751
Timid55557777102.452.452.252.2550.751300.751.2
Whimsical510103020515583.53.53.753.75150.51150.51

 

Appendix C – Personality Percentage Observations

Sortable Table: Click headers!
CategoryPersonalityObservation
Changes Tech Select Ranges the MostSelfish2 times more than average
Changes Tech Select Ranges the LeastLazy7 times less than average
Changes Tech Selections the MostSelfish4 times more than average
Changes Tech Selections the LeastEasygoing / Lazy3.5 times less than average
Move Forward the MostFiery / Lively / Nervous2 times more than average
Move Forward the LeastLazy7.5 times less than average
Move Backward the MostCalm / Lively / Nervous / Timid2 times more than average
Move Backward the LeastLazy7.5 times less than average
Makes New Decisions the Most (Forward Move)Whimsical1.2 times more than average
Makes New Decisions the Least (Forward Move)Stubborn1.3 times less than average
Makes New Decisions the Most (Backward Move)Whimsical1.1 times more than average
Makes New Decisions the Least (Backward Move)Timid1.1 times less than average
Knockback the MostHot-Cold1.5 times more than average
Knockback the LeastFiery4.5 times less than average
Melee Use Tech The Most < 50 GutsHot-Cold / Nervous / Stubborn2.6 times more than average
Melee Use Tech The Least < 50 GutsCautious19 times less than average
Close Use Tech The Most < 50 GutsNervous2.8 times more than average
Close Use Tech The Least < 50 GutsCautious17.6 times less than average
Mid Use Tech The Most < 50 GutsNervous3.4 times more than average
Mid Use Tech The Least < 50 GutsCautious14.5 times less than average
Long Use Tech The Most < 50 GutsNervous3.3 times more than average
Long Use Tech The Least < 50 GutsCautious14.9 times less than average
Melee Use Tech The Most >= 50 GutsRowdy2.3 times more than average
Melee Use Tech The Least >= 50 GutsCalm / Carefree / Lazy / Rivalrous5.1 times less than average
Close Use Tech The Most >= 50 GutsRowdy / Naughty2.5 times more than average
Close Use Tech The Least >= 50 GutsCalm / Carefree / Lazy / Rivalrous / Stubborn / Whimsical4.8 times less than average
Mid Use Tech The Most >= 50 GutsCarefree3 times more than average
Mid Use Tech The Least >= 50 GutsSociable5 times less than average
Long Use Tech The Most >= 50 GutsCalm3.1 times more than average
Long Use Tech The Least >= 50 GutsSociable4.7 times less than average

 

Credits: SmilingFaces96 Original Doc
This page was last modified: January 28 2024
LegendCup has been Ad-Free since 1999! Consider a Donation!
Can't donate? Link or Mention LegendCup wherever you discuss Monster Rancher!
もしこのサイトが役に立ったら、リンクとシェアをお願いします!
  • 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.