Back to Home

Charms: How It Works

How the Charms Optimizer Works

The Charms optimizer uses a greedy algorithm with bottleneck-aware resource scoring to find the best upgrade path for your 18 charms. It analyzes your current resources (Charm Guides and Charm Designs) and recommends upgrades that maximize your total stats.

Optimizing Your Stats

The optimizer maximizes total stat gains (Lethality + Health) from your available resources. This is best for general progression and building a stronger overall account.

Because these upgrades also earn Hall of Governors points, the results include the points each upgrade is worth, so you can time your spending around event windows.

The Algorithm: Squared Scarcity Scoring

The optimizer uses a sophisticated scoring system that automatically handles resource bottlenecks. Instead of treating both resources equally, it weights each resource by its scarcity.

How It Works

For each potential upgrade, the optimizer calculates a score based on:

  1. Percentage cost - How much of each remaining resource this upgrade uses. Using 100 Designs when you have 500 = 20% cost. Using 100 when you have 5000 = 2% cost.
  2. Scarcity weighting - Scarcer resources get much higher weight (1/remaining²). If you have 5000 Guides but only 500 Designs, the Designs cost matters ~100x more.
  3. Value gained - Stats or event points from this upgrade.

Example

Resources: 5000 Guides, 500 Designs
Upgrade costs: 200 Guides, 50 Designs

Designs are 10x scarcer, so they get weighted 100x more (squared).
Result: The optimizer heavily considers the Designs cost when scoring this upgrade.

Why This Approach?

This "squared scarcity" method naturally handles bottleneck resources. If you're running low on Designs, the optimizer automatically prioritizes upgrades that use less Designs, even if they use more of your abundant Guides.

Charm Structure

Charms are organized by troop type and gear piece:

  • 6 Infantry charms - 3 on each Infantry gear piece
  • 6 Lancer charms - 3 on each Lancer gear piece
  • 6 Archery charms - 3 on each Archery gear piece

Each charm can be upgraded from level 1 to level 11 in the current Age (the reference table shows the full ladder). Every upgrade provides both Lethality and Health stats for that troop type, plus event points.

Weight Profiles (Troop Type Prioritization)

Weight profiles let you prioritize certain troop types based on your playstyle. The optimizer will favor upgrades for higher-weighted troop types.

For detailed explanations of each weight profile and how weights affect optimization, see our Build Profiles Guide.

Amplification Factor

The Amplification Factor controls how strongly the optimizer differentiates between troop types based on your weight profile. It uses a "spread" formula that amplifies differences from the median weight.

Factor Options

Factor 1.0 (Raw Weights) - No amplification. Uses your profile weights exactly as defined.

Factor 1.25 (Recommended) - Moderate amplification. Gently increases priority differences between troop types.

Factor 2.0 (Strong) - Strong amplification. Heavily favors your prioritized troop types.

How It Works

The formula uses the median weight as an anchor point:

  • Above median: weight is multiplied by the factor (boosted)
  • Below median: weight is divided by the factor (reduced)
  • At median: weight stays unchanged (anchor point)

This creates a wider spread between your prioritized and deprioritized troop types, making the optimizer more aggressive about following your preferences.

Why 1.25x is the Default

The 1.25x default was determined through extensive parameter sweep testing across multiple weight profiles and player scenarios. We tested amplification factors from 1.0 to 2.0 and found:

  • 1.0x - Too weak; weight preferences barely noticeable
  • 1.25x - Sweet spot; meaningful preference without dominating cost-efficiency
  • 1.5x+ - Too strong; can cause extreme concentration on one troop type

Weight Balancing System

To prevent extreme concentration (e.g., 85% of upgrades going to one troop type), the optimizer applies a blend transformation after amplification. This keeps your preferences meaningful while ensuring cost-efficiency still matters.

The Problem It Solves

With certain weight profiles (like Early Game Growth), raw amplified weights can create extreme ratios. For example:

  • Infantry: 2.75x weight
  • Lancer: 0.48x weight
  • Ratio: 5.73x difference

Result: Infantry upgrades chosen even when 5x less efficient than Lancer!

The Solution: Blend Transformation

The optimizer compresses weights using a "blend_30" formula that keeps the maximum ratio around 1.4x instead of 5.7x:

After balancing:

  • Infantry: 1.00 (normalized max)
  • Lancer: 0.75
  • Ratio: 1.33x difference

Result: Preferences are respected, but cost-efficiency still matters!

Research Behind the 30% Blend

We tested 2,904 combinations across:

  • 11 different gear configurations
  • 7 blend factors (20%, 25%, 30%, 35%, 40%, 45%, 50%)
  • 3 weight profiles (Early Game Growth, Early Game Combat, and a late-game build)
  • 3 amplification factors (1.0, 1.25, 1.5)

The 30% blend factor won because it:

  • Eliminates 100% of extreme concentration cases
  • Still respects weight preferences 66% of the time
  • Works well across all tested profiles and amplifiers
  • Maintains good stat efficiency (only 0.3% less than no weights)

Spreading vs Focusing

The optimizer naturally spreads upgrades across all eligible charms because:

  • Lower-level upgrades are cheaper and more efficient
  • The algorithm picks the "best value" upgrade at each step
  • Spreading maximizes total stats per resource spent

If you want to focus on specific troop types, use the Troop Type Filter to limit which charms the optimizer considers.

Tips for Best Results

  • Enter accurate resource counts - The optimizer can only work with what you tell it you have.
  • Balance your resources - Try to keep Guides and Designs roughly balanced for best efficiency.
  • Plan around events - Hall of Governors rewards points for these upgrades, so save materials for event windows when you can.
  • Use troop filters - Focus on one troop type if you want to max a specific march.