ThePredictdocs v0.0.1 RC

Administration

Learning & training

What ThePredict learns from fights by default, how a training mob explores, and the commands that manage learned data.

ThePredict keeps score of its own decisions: after each tactic it adopts, it records what that tactic achieved. This page covers what that collection does out of the box, how a mob can be allowed to experiment, and the commands that turn the collected data into a learned file.

Note Nothing changes by default

With the shipped settings, learning only collects. It never changes a decision, never changes what is sent to Jev, and players see nothing.

What happens by default

With learning.collect at true, every tactic a mob adopts opens an outcome window that closes when the intent ends: damage dealt and taken (and damage avoided, for a retreat or a defensive skill), whether the movement reached its goal, kills. Each window is stored with the situation it happened in: distance, health, kind of target, terrain, group. When the fight ends, its final result is shared back over the windows, between the mob's own result (learning.creditShare) and its group's (learning.groupCreditShare), fading over earlier windows (learning.creditDecayPerWindow). The results are aggregated per profile and situation in the local database (see Storage & records), kept for learning.weeksKept with a half-life of learning.halfLifeDays.

Turn learning.collect off if you do not want the data at all.

Training mobs

A mob explores (tries a tactic other than its best one now and then) only where exploration is allowed:

  • Against players, only a mob whose MythicMobs file has both Predictor: true and PredictorTraining: true. There is no command, timer or global switch; remove the key to stop it.
  • In mob-against-mob duels, only with learning.exploreInDuels set to true.
plugins/MythicMobs/Mobs/TrainingDummyBoss.yml (excerpt)YAML
TrainingDummyBoss:
  Type: ZOMBIE
  Predictor: true
  PredictorTraining: true

With probability learning.exploration.epsilon, a decision explores: the mob does not ask Jev that time and draws its tactic among the candidates, usually still the best one but sometimes another. Explored adoptions never pass learning.exploration.maxShare of the total, and an answer from Jev that was already accepted is never replaced.

Learned values

/thepredict learn build turns the collected outcomes into a value file: a table of how well each tactic did in each situation, written to plugins/ThePredict/learn/artifacts/<sha256>.tplv and marked active in learn/active.json. Only sources listed in learning.trainingSources train it, a situation needs learning.minWindowsForValue windows before its value counts, and spreads below learning.minValueSpreadMillis change nothing.

Watch out Not used in fights yet

In this build the server does not load value files into fights: /thepredict learn status reports learn none, and decision.candidateScoring set to learned has nothing to act on. Building, exporting and importing files works, so you can collect and keep them for a later release. learning.scope (bench or all) is shown by learn status and has no other effect for the same reason.

Keep learning.allowUnverified at false: with true, a mode or learned file without an evaluation verdict may activate, and every start warns with the path of learn/active.json.

Calibration

Jev returns a confidence with each answer. decision.confidenceGate decides what the decision.minimumConfidence threshold compares:

  • raw (the default): Jev's confidence as it comes.
  • calibrated: a calibrated probability, from a calibration file at plugins/ThePredict/learn/active.tplc. The file is used only when a passing evaluation verdict for it is loaded; otherwise the calibration is the identity and nothing changes. The server itself does not write this file.

With calibrated, decision.minimumCalibratedConfidence at parity accepts exactly what the raw threshold of 0.45 accepts; a number from 0.50 to 0.99 sets the calibrated floor yourself.

Advanced switches

KeyWhat it doesLeave it
learning.voiSkipSkips a question to Jev when learned data says the local answer almost surely matches. shadow only measures. It relies on learned values and its own evaluation verdict."off"
learning.jevHintIn shadow, computes a hint for Jev and stores it in the records (planned.jev_hint); it is never sent, so the request stays the same as with off."off"
learning.groupPlansReserved."off"

Note Keys not read yet

learning.maxContextKeysPerProfile, learning.maxOpenWindowsPerSession, learning.calibration.minDecisions and learning.calibration.driftReferenceWindows are accepted and validated, but this build does not read them (a session always keeps at most 32 open windows). A value other than the shipped one logs a warning at startup.

Commands

CommandPermissionWhat it does
/thepredict learn or learn statusthepredict.learn or thepredict.adminOne line: learn <state> artifact <sha or none> verdict <verdict or none> collect <learning.collect> scope <learning.scope>.
/thepredict learn build [profile]thepredict.learnBuilds a value file from the collected data, for every profile or one, and marks it active.
/thepredict learn export <sha256> <file>thepredict.learnCopies a value file to learn/export/<file>.
/thepredict learn import <file>thepredict.learnReads learn/export/<file> or learn/import/<file> and stores it under learn/artifacts/, waiting for a verdict.
/thepredict learn rollbackthepredict.learnPoints learn/active.json back at the previous value file.
/thepredict learn disable value|calibration|allthepredict.learnClears the active value file, the calibration, or both.

Every command except status answers queued, runs on the ThePredict-Storage thread and reports its result when it finishes. File names cannot contain a path or ... Without the storage writer, the command answers Learn <action> needs the storage writer.; a second command of the same kind while one runs answers A learn command of that kind is already running.

All the keys are in the config.yml reference.

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.