ThePredictdocs v0.0.1 RC

Combat systems

Patterns

parts changing soon

How ThePredict reads one enemy's habits — click spam, strafes, shield timing, heals at low health — and how a boss can punish them.

A pattern is a habit of one enemy: spamming clicks, strafing the same way, keeping the shield up, drinking a potion every time health drops. ThePredict watches each enemy of an encounter separately, notices when a habit is real, and can lean the mob's next moves toward the counter.

Everything is read from what the mob could witness: observed movement and combat events (hits, criticals, shield up and down, bow draws, eating and drinking). ThePredict never reads a player's raw keyboard input. MythicMobs' own input and HasItem conditions are yours to use in your skills; ThePredict does not read them.

Modes

ModeWhat it does
offNo observation.
observeDetects and records patterns; decisions stay unchanged. The shipped default.
biasobserve, plus the local engine leans toward the counter of an active pattern.
fullbias, plus short pattern phrases reach Jev.

patterns.mode sets the ceiling; a profile's Patterns.Mode can only lower it (a higher value warns is above Patterns.Mode and uses the minimum).

Watch out bias and full need a verdict

bias and full change how the mob fights, so they stay at observe until an evaluation verdict for these exact pattern settings is loaded. bias needs a passing simulator verdict; full also needs a passing bench verdict, and with only the first it falls back to bias with a warning. Verdict files come from the offline evaluation tools and are loaded with /thepredict eval verdict import <file> (see Commands & permissions). Until then, /thepredict status names the cause UNVERIFIED_PATTERN_MODE. Changing the patterns.* keys changes the settings' fingerprint, so an older verdict no longer applies.

How a pattern is detected

Every enemy's actions are turned into a short stream: idle, strike, strike_early, crit_strike, sprint_strike, shield_up, shield_down, strafe_left, strafe_right, step_in, step_out, jump, sprint_reset, draw, release and consume. Movement is sampled every patterns.sampleTicks, and sideways motion of patterns.strafeBlocks or more counts as a strafe. At most patterns.maxReadsPerTick movement reads run per tick across the server; the others wait for a later tick.

Each pattern has its own detector and threshold. It needs at least patterns.minTrials chances to show, must clear its threshold for patterns.persistUpdates updates in a row to become active, and turns off when its evidence falls patterns.exitMargin below the threshold. Old evidence fades with patterns.evidenceForgetting, and when the enemy suddenly changes style the evidence is reset.

In simulation, with the shipped forgetting of 0.98, a habit shown 80 % of the time was detected in 92.5 % of runs (median 24 chances), a 70 % habit in 41.8 %, and false positives stayed at 0.1 %.

Patterns

PatternGroupReadsThreshold
spams_clicksrhythmSwings before the attack has recharged.0.60
crit_jumperrhythmJumps in to land critical hits.0.50
wtap_pressurerhythmRe-sprints between hits.0.60
predictable_strafe_leftmovementStrafes to its left in melee.0.60
predictable_strafe_rightmovementStrafes to its right in melee.0.60
chases_retreatmovementChases a foe that steps back.0.60
shield_turtledefenseKeeps the shield raised most of the time.0.50
shield_latedefenseRaises the shield too late.0.60
overextends_after_blockdefenseStrikes right after blocking.0.60
no_shielddefenseFights without a shield.0.80
fails_answer_blocktellsFails to block a telegraphed attack.0.60
fails_answer_dodgetellsFails to dodge a telegraphed attack.0.60
fails_answer_back_offtellsFails to back away from a telegraphed attack.0.60
fails_answer_break_sighttellsFails to break line of sight in time.0.60
fails_answer_interrupttellsFails to interrupt a telegraphed attack.0.60
fails_dodge_projectiletellsIs often hit by projectiles.0.60
weak_to_areatellsIs often caught by area attacks.0.60
heals_at_low_hpresourcesHeals when health is low.0.60
pearls_when_lowresourcesEscapes with an ender pearl when hurt.0.50
retreats_when_lowresourcesRetreats when health is low.0.60
relies_on_totemresourcesHas survived with a totem.0.50
kites_at_rangedistanceKeeps its distance and shoots.0.60
seeks_high_grounddistanceClimbs out of melee reach.0.60
mace_diverdistanceDives from above with a mace.0.50
fixed_cadencerhythmAn entity hits on a fixed interval. No threshold and no phrase.—

fixed_cadence is read only from non-player entities and has no threshold and no phrase for Jev.

Forecast

ThePredict also predicts the enemy's next action from the last two. The forecast is shown only while its running accuracy is at least patterns.forecastMinAccuracy.

Vocabulary

ElementWhat it does
predictorpattern{pattern=<name>} (key pattern or p)True while ThePredict controls the mob and its current target has that pattern active. Names are the lower-case names above; an unknown name is always false and the load warns predictorpattern: pattern is not an enemy pattern; the condition is always false.
<caster.predictor.pattern>The target's most confident active pattern, or none.
<caster.predictor.forecast>The target's forecast next action (an action name from the list above), or none.
PREDICTOR_PATTERN_<PATTERN>Signal sent once each time a pattern becomes active (also when it comes back after a rest), to each mob of the encounter whose target is that enemy and that has a handler: ~onSignal:PREDICTOR_PATTERN_SHIELD_TURTLE, or a bare ~onSignal. It says what was read, not what the mob will do.

Watch out Only in bias and full

The condition, the placeholders and the signal act only in the bias and full modes. With the shipped observe mode, predictorpattern is always false, both placeholders show none and no signal is sent: a mode that does not change decisions does not move your skills either.

Exploiting a pattern

Changing soon

How far a boss may exploit a player's habits is part of the fairness rules that will be replaced by intelligence levels in an upcoming release. This section documents how the current build works.

In bias and full, an active pattern leans the mob toward its counter: the EXPLOIT_PATTERN reaction prefers the matching skill, and with decision.candidateScoring set to utility the score of a tactic that fits the counter rises by 10 %. Counters never shorten a tell, a cooldown or a wind-up. The movement part needs Timing.TickLayer: full.

PatternPreferred counterMovementGroup plan hint
spams_clicksmedium-damage skillsstep in
crit_jumperDAMAGE or CONTROL skillsstep back
wtap_pressureCONTROL or a skill that pushes the targetsidestep
predictable_strafe_left, predictable_strafe_rightAREA_AT_TARGET or CONE skillsorbit
chases_retreatAREA_AT_TARGET or CONTROL skillsstep back
shield_turtleskills that ignore shieldsorbit
shield_lateskills whose tell asks to block
overextends_after_blockINTERRUPT or medium damagestep back
fails_answer_block … fails_answer_interruptskills whose tell asks for that answer
fails_dodge_projectilePROJECTILE skills
weak_to_areaAREA_AT_TARGET or CONE skills
heals_at_low_hpINTERRUPT, saved for the momentpress_main_target
pearls_when_lowPROJECTILE or GAP_CLOSE, saved for the moment
retreats_when_lowGAP_CLOSE or PROJECTILEharass_from_range
relies_on_totemFINISHER, saved for the moment
kites_at_rangeGAP_CLOSEsurround_target
seeks_high_groundPROJECTILEstand stillharass_from_range
mace_divermedium-damage skillssidestep
no_shield, fixed_cadencenone

A counter only helps if the boss has a skill with that role or delivery in its Intention lines (see Skills & intents). Against players, exploitation is capped:

  • At most patterns.maxExploitShare (half, as shipped) of the casts in a window of patterns.exploitWindowTicks may be pattern-motivated, and the difficulty controller's pressure rung can lower that share (the lowest rungs do not exploit at all).
  • After patterns.restAfterSuccesses successful counters in a row the pattern rests for patterns.restTicks: no lean, no fact for Jev, predictorpattern turns false for it, and the mob makes no pattern-motivated cast. When the rest ends, the pattern comes back active if the habit still holds (its evidence is still above the threshold), which counts as a new activation and sends its signal again; otherwise it turns inactive and must be detected again.
  • At most patterns.maxExploitedPatterns patterns are exploited at once.

Against non-player targets the cap does not apply unless the profile sets Patterns.AgainstEntities to fair. With Entropy on and a passing verdict, the cap is lifted.

In full, an active pattern can also reach Jev as a short phrase (unless the profile sets Patterns.Facts to false): a fact must hold patterns.factOnTicks to be sent and be gone patterns.factOffTicks to be dropped, with at most patterns.maxFactsPerParticipant per enemy and patterns.maxFactsPerRequest per request.

Example: with and without ThePredict

A classic MythicMobs boss can only hard-code one habit check per skill line:

Without ThePredictYAML
Skills:
- variableAdd{var=caster.tp_spam;amount=1} @self ~onDamaged ?varInRange{var=skill.hit-attack-cooldown;value=0to0.5}
- shieldbreak{d=100} @trigger ~onAttack ?~blocking

With ThePredict, the detector decides when a habit is real and when it changed, and your skill simply asks, or listens for the moment it is spotted:

With ThePredict (patterns.mode bias, with a verdict)YAML
Skills:
- skill{s=Boss_ShieldBreaker} @target ~onTimer:10 ?predictorpattern{p=shield_turtle}
- skill{s=Boss_TurtleTaunt} @self ~onSignal:PREDICTOR_PATTERN_SHIELD_TURTLE

The shield breaker and the taunt are still your skills, with your effects; ThePredict only tells them when the target turtles. The signal fires once per activation, so the taunt plays when the habit is first spotted, not on every tick.

The Patterns section of a profile

AIConfig/Profiles/duelist.yml (excerpt)YAML
  Patterns:
    Mode: observe
    AgainstEntities: free
    Facts: true

Keys, defaults and ranges are in the Profile reference and the config.yml reference.

Note Global keys not read yet

patterns.hearingBlocks, patterns.maxWatchedPerEncounter and patterns.maxCounterDelayTicks are accepted and validated, but this build does not read them. A value other than the shipped one logs a warning at startup.

Inspect a target's patterns

/thepredict inspect <nearest|uuid> patterns reads the live model of the mob's current target: the actions of the last 40 ticks, the forecast and its accuracy (in thousandths), and for a pattern its state (inactive, active or resting), confidence, trials, success streak, rest, the quota used and the facts sent. Without a session, a target or a model it prints nothing. The exact in-game text has not been verified on a live server yet.

ThePredict 0.0.1 · release candidate. These pages describe this build, checked against its source code; it has not been verified on a live server yet.

ThePredict is an independent MythicMobs addon. Jev is TypeSafe's decision model; naming it does not imply endorsement. Fonts: Pixelify Sans, Inter and JetBrains Mono, under the SIL Open Font License.