YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

πŸš€ Orbit Wars Agent - Kaggle Competition Submission

A strong hybrid agent for the Orbit Wars Kaggle Competition designed to achieve top-5 ELO.

Architecture

This agent combines rule-based strategy with adaptive opponent modeling for maximum performance:

Core Engine (Rule-Based)

  1. Forward Simulation - Simulates every planet's future for 110 turns, accounting for all incoming fleets, production, and combat resolution

  2. Multi-Mission Dispatch - 7 mission types with priority ordering:

    • REINFORCE - Send ships to hold threatened planets
    • RESCUE - Emergency reinforcement for planets about to fall
    • RECAPTURE - Take back lost planets immediately
    • CAPTURE - Standard planet conquest
    • SNIPE - Arrive at neutrals right after enemy fleet battles
    • SWARM - Multi-source coordinated attacks
    • CRASH_EXPLOIT - Arrive after inter-enemy fights
  3. Target Valuation - Sophisticated scoring:

    score = (production Γ— remaining_turns) / (ships_sent + arrival_turns Γ— 0.5 + 1)
    

    With multipliers:

    • 2.05Γ— for enemy planets (gain + deny)
    • 1.65Γ— for static enemy planets
    • 1.4Γ— for static neutrals
    • 0.7Γ— for contested neutrals
    • 2.0Γ— for exposed (just-captured) planets
  4. Orbital Mechanics - Predicts rotating planet positions and computes intercept angles

  5. Sun Avoidance - Routes fleets around the central sun

  6. Dynamic Game Phases - Early expansion β†’ mid-game control β†’ finishing mode β†’ total war

Adaptive Layer (Learning)

  1. Opponent Modeling - Tracks enemy behavior patterns:
    • Expansion rate
    • Aggression level
    • Fleet deployment patterns
  2. Dynamic Parameter Tuning - Adjusts strategy multipliers based on opponent behavior
  3. Weakest Enemy Targeting - In 4P games, focuses on eliminating the weakest opponent first (1.5Γ— value multiplier)
  4. Elimination Bonus - Extra incentive to finish off weak opponents

Key Strategies for ELO Climbing

Production Snowball

The game is won by production advantage. Every ship not heading to a planet is wasted. This agent:

  • Computes exact keep_needed for each planet via forward simulation
  • Sends surplus ships immediately (surplus-based dispatching)
  • Prioritizes high-production targets early

Fleet Speed Exploitation

Fleet speed scales logarithmically with size: speed = 1 + 5 Γ— (log(ships)/log(1000))^1.5

  • 5 ships: 1.1 speed
  • 50 ships: 2.2 speed
  • 500 ships: 4.5 speed

This agent sends optimally-sized fleets for speed/cost balance.

4-Player Strategy

  • Target weakest enemy first (1.5Γ— value multiplier)
  • Elimination bonus when enemy < 110 ships
  • Gang-up exploitation (arrive after enemy inter-fights)
  • Conservative defense in crowded games

How to Submit

Kaggle Submission

  1. Download submission.py
  2. Create a new Kaggle notebook
  3. Copy the content into the notebook
  4. Make sure the agent(obs, config) function is defined
  5. Submit

Local Testing

from kaggle_environments import make
from submission import agent

env = make("orbit_wars", debug=True)
result = env.run([agent, "starter"])
print(f"Result: {'WIN' if result[-1][0].reward == 1 else 'LOSS'}")

Performance

  • vs Random: ~100% win rate
  • vs Starter: ~90%+ win rate (dominates the baseline)
  • 4-Player Mixed: Strong performance, adapts to multi-agent dynamics
  • LB Expected: 1200+ ELO

Game Mechanics Summary

  • 100Γ—100 board with central sun (radius 10)
  • Planets orbit the sun; outer planets are static
  • Each planet produces ships per turn
  • Send fleets: [from_planet_id, angle, num_ships]
  • Fleet speed scales with size (logarithmic)
  • Combat: largest fleet wins, excess fights garrison
  • Win: most total ships at step 500, or eliminate all opponents

Files

  • submission.py - Full agent code (3379 lines)
  • main.py - Usage instructions

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support