Prediction & Team Synergy
Prediction & Team Synergy
Section titled “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.
Prediction Config
Section titled “Prediction Config”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 }}Prediction Fields
Section titled “Prediction Fields”| Field | JSON Key | Type | Default | Description |
|---|---|---|---|---|
| Enabled | enabled | bool | true | Master toggle for all prediction features. |
| Remember Revealed Moves | remember_revealed_moves | bool | true | Track which moves the opponent has used. Accessible via q.memory.* queries. |
| Remember Revealed Items | remember_revealed_items | bool | true | Track items the opponent has revealed (consumed berries, etc.). |
| Remember Revealed Abilities | remember_revealed_abilities | bool | true | Track abilities the opponent has triggered. |
| Predict from Team Preview | predict_based_on_team_preview | bool | true | Use team preview information for predictions. |
| Predict Moves from Species | predict_moves_from_species | bool | true | Assume the opponent might have common moves for their species (e.g., a Garchomp probably has Earthquake). |
| Memory Decay | memory_decay | double (0.0—1.0) | 0.0 | How 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. |
Memory Queries
Section titled “Memory Queries”Prediction data is accessible in Molang conditions through q.memory.*:
| Query | Returns | Description |
|---|---|---|
q.memory.opponent_revealed_moves | array | Moves the opponent has used |
q.memory.opponent_revealed_item | string | Opponent’s revealed item |
q.memory.opponent_revealed_ability | string | Opponent’s revealed ability |
q.memory.times_move_used(move) | double | How many times a specific move has been used |
q.memory.total_switches | double | Total switches made during the battle |
q.memory.opponent_switch_likelihood | double (0.0—1.0) | Estimated probability the opponent will switch |
Team Synergy Config
Section titled “Team Synergy Config”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 } ] }}Synergy Fields
Section titled “Synergy Fields”| Field | JSON Key | Type | Default | Description |
|---|---|---|---|---|
| Enabled | enabled | bool | true | Whether synergy is considered. |
| Spread Move Bonus | spread_move_bonus | double | 1.2 | Multiplier for spread moves that hit multiple opponents (e.g., Earthquake, Rock Slide). |
| Ally Protection Bonus | ally_protection_bonus | double | 1.5 | Multiplier for protection/redirection moves (Follow Me, Rage Powder). |
| Weather Setup Bonus | weather_setup_bonus | double | 1.3 | Multiplier for setting weather that benefits an ally. |
| Terrain Setup Bonus | terrain_setup_bonus | double | 1.3 | Multiplier for setting terrain that benefits an ally. |
| Avoid Hitting Ally Penalty | avoid_hitting_ally_penalty | double | 0.3 | Multiplier applied when a move would damage your own ally (e.g., Earthquake hitting your partner). |
| Synergy Rules | synergy_rules | array | [] | Custom synergy rules with Molang conditions. |
Synergy Rule Fields
Section titled “Synergy Rule Fields”Each entry in synergy_rules has:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier. |
condition | Molang | Condition checked on the ally. |
move_condition | Molang (optional) | Additional condition on the move being evaluated. |
bias_multiplier | double | Multiplier applied to move score when both conditions pass. |
Example: Weather Synergy
Section titled “Example: Weather Synergy”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.