Skip to content

Prediction & Team Synergy

Prediction controls what the AI remembers and infers about the opponent during battle. Team synergy governs ally-aware decision-making in doubles and multi battles.

Controls the AI’s ability to track and predict opponent behavior. When enabled, the AI remembers revealed moves, items, and abilities, and can use species data to anticipate threats it has not yet seen.

{
"prediction": {
"enabled": true,
"remember_revealed_moves": true,
"remember_revealed_items": true,
"remember_revealed_abilities": true,
"predict_based_on_team_preview": true,
"predict_moves_from_species": true,
"memory_decay": 0.0
}
}
FieldJSON KeyTypeDefaultDescription
EnabledenabledbooltrueMaster toggle for all prediction features.
Remember Revealed Movesremember_revealed_movesbooltrueTrack which moves the opponent has used. Accessible via q.memory.* queries.
Remember Revealed Itemsremember_revealed_itemsbooltrueTrack items the opponent has revealed (consumed berries, etc.).
Remember Revealed Abilitiesremember_revealed_abilitiesbooltrueTrack abilities the opponent has triggered.
Predict from Team Previewpredict_based_on_team_previewbooltrueUse team preview information for predictions.
Predict Moves from Speciespredict_moves_from_speciesbooltrueAssume the opponent might have common moves for their species (e.g., a Garchomp probably has Earthquake).
Memory Decaymemory_decaydouble (0.0—1.0)0.0How quickly the AI “forgets” information. 0.0 means perfect memory. 0.5 means it forgets half the information each turn. 1.0 means it forgets everything immediately.

Prediction data is accessible in Molang conditions through q.memory.*:

QueryReturnsDescription
q.memory.opponent_revealed_movesarrayMoves the opponent has used
q.memory.opponent_revealed_itemstringOpponent’s revealed item
q.memory.opponent_revealed_abilitystringOpponent’s revealed ability
q.memory.times_move_used(move)doubleHow many times a specific move has been used
q.memory.total_switchesdoubleTotal switches made during the battle
q.memory.opponent_switch_likelihooddouble (0.0—1.0)Estimated probability the opponent will switch

Controls how the AI considers ally interactions in doubles and multi battles.

In singles battles, team synergy has no effect.

{
"team_synergy": {
"enabled": true,
"spread_move_bonus": 1.2,
"ally_protection_bonus": 1.5,
"weather_setup_bonus": 1.3,
"terrain_setup_bonus": 1.3,
"avoid_hitting_ally_penalty": 0.3,
"synergy_rules": [
{
"id": "sun_for_chlorophyll",
"condition": "q.ally.has_ability('chlorophyll')",
"move_condition": "q.move.sets_weather('sun')",
"bias_multiplier": 2.0
}
]
}
}
FieldJSON KeyTypeDefaultDescription
EnabledenabledbooltrueWhether synergy is considered.
Spread Move Bonusspread_move_bonusdouble1.2Multiplier for spread moves that hit multiple opponents (e.g., Earthquake, Rock Slide).
Ally Protection Bonusally_protection_bonusdouble1.5Multiplier for protection/redirection moves (Follow Me, Rage Powder).
Weather Setup Bonusweather_setup_bonusdouble1.3Multiplier for setting weather that benefits an ally.
Terrain Setup Bonusterrain_setup_bonusdouble1.3Multiplier for setting terrain that benefits an ally.
Avoid Hitting Ally Penaltyavoid_hitting_ally_penaltydouble0.3Multiplier applied when a move would damage your own ally (e.g., Earthquake hitting your partner).
Synergy Rulessynergy_rulesarray[]Custom synergy rules with Molang conditions.

Each entry in synergy_rules has:

FieldTypeDescription
idstringUnique identifier.
conditionMolangCondition checked on the ally.
move_conditionMolang (optional)Additional condition on the move being evaluated.
bias_multiplierdoubleMultiplier applied to move score when both conditions pass.

This rule boosts weather-setting moves when your ally has a weather-dependent ability:

{
"id": "sun_for_chlorophyll",
"condition": "q.ally.has_ability('chlorophyll')",
"move_condition": "q.move.sets_weather('sun')",
"bias_multiplier": 2.0
}

When the AI’s ally has Chlorophyll, any move that sets Sunny Day gets its score doubled — encouraging the AI to set up sun for its partner.