LEIAGlaubermon

Glaubermon Max

YOU VS. MODEL · GEN 9 OU

YOU VS. GLAUBERMON MAX

Glaubermon is a LEIA model for singles battles in the competitive Gen 9 OU format. Each turn it estimates what could happen if it attacks, switches Pokémon or Terastallizes, and picks the play it rates best.

Choose a team of six Pokémon to begin.

Choose your team to begin.

Preparing the battle…
New battle against Glaubermon.CreditsPokémon © Nintendo / Creatures / GAME FREAK
↑ Demo

Search and learning ·

Glaubermon Max

glaubermon-max

Participants · LEIASantiago Saldaña Subías · Felipe Pacheco Zamorano · Diego Perea León

Decision model for based on , and a hybrid neural and evaluation.

Two players choose without knowing each other's action. Glaubermon estimates what may happen when it attacks, switches Pokémon or uses ; it compares those possibilities through search and combines a learned network with competitive knowledge. The study asks how much the network contributes and how the rules, hidden information and the time available affect the decision.

Project date
Model used
network +

What the player knows

The input is a structured battle state, built from the player's own information and the public events reported by . It includes health, types, moves, , stats, status conditions and stat changes; it also includes weather, terrain, and . The battle image helps the reader follow the game; the network receives numerical variables.

The agent knows its own team. For the opponent, it keeps what has been revealed and fills in unknown data with . For example, seeing a Pokémon use a move confirms that option; moves not yet used remain estimates. This reconstruction can be wrong, particularly against uncommon teams.

FIGURE 1 / OBSERVING IS NOT KNOWING EVERYTHING

Permitted information

Own team, legal menu, public , moves used, revealed items or abilities, and field events.

Estimated information

Unrevealed moves, exact stats, items or abilities still hidden, and the opponent's future Tera type.

In official training and evaluation, each player receives its own private channel. The decision-maker does not receive the opponent's private request or the referee's full secret state.

The initial design proposed a to maintain several hypotheses. The decision path studied here relies mainly on point estimates from the and on public reveals. It is therefore not presented as full over the opponent's team.

Choosing against an unknown action

The menu allows the player to use moves, switch to an available teammate and combine a move with . The has 14 positions: four moves, their four Tera variants and six team slots for switches. The legal state excludes options such as switching to the active Pokémon, sending in a fainted one or using Tera once it has been spent. A forced replacement constitutes a separate phase.

On each turn a table is built: each row is one of the player's own actions and each column a possible opponent response. A cell simulates both choices, orders their execution by priority and Speed, and estimates the resulting state. The value combines the , consequences such as a and tactical adjustments defined by the team.

FIGURE 2 / ONE CELL REPRESENTS TWO CHOICES
Schematic of a matrix; the cells are computed values, not benchmark results.
Own action ↓ / opponent →Opponent attacksOpponent switches
AttackResolve priority, damage and survivalValue the attack against the incoming Pokémon
SwitchApply entry hazards and take the attackValue the new matchup and the entry hazards
The best action against one column can be poor against another. The looks for a distribution that withstands unfavorable responses, using the available approximation of the opponent.

continues some branches and solves child matrices. Candidate selection limits exploration: the search does not exhaustively traverse every possible future. Replacements after a KO and attacks left pending after a are resolved in their proper order; they can multiply the computation even at the same depth.

A solver computes a -type solution, with small preferences to break ties. Its is a distribution, but the game and evaluation client selects the highest-probability action. Official self-play samples in normal decisions. That difference matters: computing a mixture does not guarantee executing it, nor does it make the bot unexploitable.

FIGURE 3 / WHAT CHANGES WHEN AN EVALUATOR IS CHOSEN
Leaf value:

V(s) = 0.60 · Vnet(s) + 0.40 · Vrules(s)

Combines the value learned by the network with the fixed evaluation. The neural policy also contributes preferences to the matrix solver.

  1. StateObservation and hypotheses
  2. SimulationCombinations and continuations
  3. EvaluationHybrid
  4. MatrixDistribution and chosen action
Purple blocks: parameters adjusted during training.
The control changes the explanation of the computation. The , the and the serve different functions. The hybrid proportion is fixed; that mixture was not learned.

A network that relates teams

The large configuration, which followed the initial imitation model, encodes the moves of each Pokémon and averages their representations. It joins that summary with the Pokémon's stats to form a of 256 values. Three blocks relate the members of each team; then relates the two teams. Each block uses eight .

The summary of each team is obtained by . Both summaries and the field conditions are fused and feed two outputs: a value between −1 and +1 and the action preferences. The value estimates advantage; it is not interpreted as a .

FIGURE 4 / SHARED REPRESENTATIONS, TWO OUTPUTS
Own teamMoves + stats
Opponent teamRevealed information + hypotheses
AttentionRelations within the team
Cross-attentionRelations between the teams
AveragesSummary of each team
Field + fusionEncode and combine the context
ValueEstimate the position
PolicyPreferences for the search
Purple blocks: parameters adjusted during training.
The field encoding and the fusion contain , as do the attention, value and policy layers. Averaging the representations is a fixed operation. The battle rules, legal actions, heuristic coefficients and the solver remain defined by the method.

The current representation contains 33 features per move, 86 per Pokémon and 40 for the field. The historical weights were trained with a smaller input contract; the added inputs are adapted with zero-initialized weights. A new signal available in the observation requires training before the network learns to use it.

Averaging tokens makes the team summary . However, the policy uses fixed action positions, and the moves are also averaged: this invariance of the summary does not show that the preferences stay correctly aligned when moves or teammates are reordered. The evaluation uses the orders fixed in its teams.

What is learned and where the labels come from

The team's work begins with : reconstructing positions and fitting the policy to the recorded actions, while the value head learns from the outcome. The scripts include Showdown and a public corpus in format filtered by . Predicting those actions well does not guarantee playing better; public records also leave hidden data that the parser must estimate.

The second route is . The search produces a target distribution for the policy; a terminal win, loss or draw produces the value label. Examples from both players are accumulated in a and used to fit the network. The combination is inspired by and ; the implementation does not reproduce all of their theoretical conditions.

Self-play loss = terminal value error + with the search policy.

The official path uses Showdown to resolve the games and the same permitted-information reader that the client uses. If the turn limit is reached without a result, those examples can still teach the search policy, but no win label is invented for them and the value loss is not updated with them.

This corrects two biases of the first internal path: learning with opponent information that was not available during play, and treating a heuristic evaluation at the point where the game was cut off as if it were the actual outcome. The search retains its own approximate simulator, so using an official referee to generate labels does not eliminate all decision errors either.

During evaluations the . The game updates what the player knows about the opponent, but not the network's parameters.

How the project evolved

  1. Initial team development · before the official evaluation

    Imitating games and searching for simultaneous responses

    The team's project brings together replays, supervised pretraining, a set network and self-play variants named AlphaZero and ReBeL. Games against players revealed switching loops, misuse of Tera and poor tactical decisions; the team introduced strategic rules and branch selection.

  2. September 2026 · method comparison

    Separating the model from the rules

    The neural, heuristic and hybrid evaluators were separated, and the neural value was incorporated into the client's decision. The first official pilot compared the hybrid with an that kept the search and removed the network.

  3. September 2026 · environment and observation

    Learning from the outcome each player sees

    Self-play moved to consequences adjudicated by Showdown, per-player observation channels and terminal labels. The mechanics of the practice and evaluation teams were checked: field, temporary conditions, moves, abilities, items and replacements.

  4. September 2026 · candidate and decision budget

    Measuring quality under a clock

    A candidate continued learning from official games. Its evaluation found losses on time that prevent tactical quality from being isolated. Grouping independent leaves reduced the workload without removing their alternatives; performance under the clock remains part of the comparison that is still needed.

Results and what they support

The neural improvement has not yet been demonstrated

In the official pilot, the hybrid won 73/100 games and the heuristic search won 79/100, both against the same control. The estimated difference is −6 , with a 95% interval from −16 to +4. The interval includes zero: this benchmark does not establish an advantage for the neural .

A later evaluation of the candidate suffered . The mechanics checks and the speed measurements answer different questions and are not converted into an overall success rate for the project.

Game-quality pilot · September 11, 2026

The opponent was poke-env's SimpleHeuristicsPlayer, a rule-based player. It is distinct from Glaubermon's heuristic evaluator: both Glaubermon modes keep their own search. A total of 200 games were played on Showdown 0.11.11, Gen 9 OU, at depth 2, with frozen historical weights and three legal teams: and pelol.

FIGURE 5 / THE ESTIMATED EFFECT OF ADDING THE NETWORKHybrid: 73 of 100 wins, interval 65 to 81 percent. Heuristic: 79 of 100, interval 70 to 87. Hybrid minus heuristic difference: minus 6 points, interval minus 16 to plus 4.
The points show the observed proportion; the bars, the . The difference uses the same pairings between modes.
Complete games against the control; there were no draws or unresolved results.
Glaubermon evaluatorWinsLosses of the proportion
Hybrid73/10027/10065%–81%
Heuristic79/10021/10070%–87%

Fifty blocks of two games were formed per mode. Each block keeps its and pairing and swaps sides and teams. The bootstrap resamples complete blocks with 20,000 replicates. The uncertainty describes that small pool and those seeds; it does not include multiple independent training runs. The historical weights may have seen those teams during training.

The proposed hyper offense team was excluded before the pilot was frozen because it included a Pokémon rejected by the OU validator of that version. The study does not measure the whole or unknown teams. In addition, this pilot predates the later extensions to observation and mechanics: its figures are not automatically attributed to the most recent code.

Computation time in the same pilot

on macOS ARM, four processes, PyTorch with one thread per process; seconds per decision.
ModeDecisionsMaximum
Hybrid4,0611.025 s1.599 s3.918 s
Heuristic3,9570.184 s0.361 s0.829 s

The hybrid made 185,491 calls to the network; the heuristic mode made none. Both recorded zero invalid actions and zero automatic emergency choices. These checks document the computation used in that benchmark, but they do not turn the higher neural cost into a competitive improvement.

Official candidate and evaluation under a clock · September 14

The candidate received 100 official training games, with 2,341 turns and 5,613 examples, on an . It was trained at depth 1 with a 60 s limit per decision; the evaluation used depth 2 and a 30 s limit. The decision budget was therefore different.

100 games scheduled per configuration, official Showdown, Windows/RTX 4090; a loss on time counts as a loss.
ConfigurationRecorded winsCompleted games
Hybrid · original14/10019/10081/100
Hybrid · candidate1/1001/10099/100
HeuristicSame result in both evaluations71/100100/1000/100

The candidate loses on time in almost every game under that limit. This is an unfavorable result for performance under a clock, but it does not allow the quality of its decisions to be separated from the cost of obtaining them. Taking only the finished games would exclude many losses and bias the comparison. Nor would it be valid to convert these results into an rating or to claim that the network learned worse.

Historical learning budget and mechanics checks

Training counters are not wins

The historical ReBeL metadata record 45,075 simulated games and 1,172,760 turns; the AlphaZero metadata, 15,423 games and 405,707 turns. These are counters from two learning logs. They are not summed as independent samples or presented as official games won.

Checking rules has a specific scope

The initial audit gathered 320 from five scenarios with 64 seeds each. For example, Stone Edge missed 13/64 times in Showdown and 0/64 times in the original internal transition; a speed tie came out 26/38 for in Showdown and 64/0 locally. These were differences in the environment that could feed learning, not competitive win rates.

Later corrections checked a bounded inventory of 57 moves, 16 abilities and 13 items from five teams. Five matched from start to finish: 292 phases and 248 turns, with coupled random outcomes. That sample verifies its own scope; it does not certify all Pokémon rules, interactions or teams.

What batching search leaves showed

By grouping independent leaves into , two problematic decisions reduced their network calls from 3,312 to 226 and from 1,905 to 269, while preserving the checked decisions. The replacement alternatives were kept: the batch size limits memory, not the number of choices considered.

A later check on CPU/macOS completed eight games with the original and the candidate, at depth 2 with a 30 s limit, with no , invalid actions or emergency choices. The maximum observed was 9.61 s with the original and 6.67 s with the candidate; 702 checked requests showed no discrepancies in legal menus or PP. This sample measures computation and consistency, not an improvement in .

Scope of the evidence

The competitive comparison covers three legal teams against SimpleHeuristicsPlayer, with the specified seeds and decision budgets. Its conclusions are limited to that benchmark and to the configurations evaluated. The network, the approximate simulator, the opponent hypotheses and the branch selection jointly contribute to those decisions.