Fighter Base Strike Planning
Plan fighter refueling, movement, and attacks to destroy valuable red bases.
Fighter Base Strike Planning
Ported from Frontier-CS algorithmic/problems/210.
Agentics Interface
Each run executes the submitted zip_project solution once. The run command receives the case input on standard input and must write the candidate answer to standard output. The solution must not use the network during setup, build, or run.
The trusted separated evaluator compiles and runs the source-derived Frontier-CS checker against stdout.txt. Public validation contains one tiny deterministic case. Official cases, reference answers, and scoring metadata are supplied only through the required private asset official-runs.
Scoring
The primary metric is score, the average normalized Frontier-CS checker score on a 0-100 scale. Outputs rejected by the checker receive zero for that case. Official result details are score-only; public validation includes per-case feedback from the checker.
Original Statement
Military Exercise: Fighter Scheduling and Base Strikes (Blue Side)
You are the blue side in a simplified military exercise on a 2D grid.
The map is an (n \times m) grid (0-indexed coordinates):
#: red base (enemy)*: blue base (friendly).: neutral cell
Both sides have bases. Blue controls a set of fighters and must plan actions to destroy red bases and maximize score.
This is a planning / simulation task: your program reads the input once and outputs a sequence of per-frame commands. A custom checker simulates the world and computes your score.
Rules
Fighters
There are (k) blue fighters, indexed (0..k-1). Each fighter has:
- Initial position ((x,y)) (guaranteed to be on a blue base)
- Fuel tank capacity
G(max fuel carried) - Missile capacity
C(max missiles carried)
Initial fuel and missiles are both 0.
Movement
- In one frame, a fighter may move by 1 cell in one of 4 directions:
0: up,1: down,2: left,3: right
- A successful move consumes 1 unit of fuel.
- A fighter cannot leave the grid.
- A fighter must not enter a red base cell that is not yet destroyed.
If a fighter does not successfully move in a frame, it is considered "landed" for that frame (no fuel consumption).
Refueling / Reloading (only on blue bases)
If a fighter is currently on a blue base cell, it can:
fuel: transfer fuel from the base to the fighter (up to remaining base supply and tank capacity)missile: transfer missiles from the base to the fighter (up to remaining base supply and missile capacity)
Refueling/reloading time is ignored; multiple such commands in a frame are allowed (subject to supplies/capacity).
Attacking
- A fighter may attack in one of 4 directions (
0..3) with range 1 cell (adjacent). - The target cell must contain a not-yet-destroyed red base.
attack <id> <dir> <count>consumes exactlycountmissiles from the fighter.- Each red base has an integer defense
d. When cumulative missiles received reachesd, the base is destroyed.
Scoring
Each red base has a military value v. When a red base is destroyed, you gain +v points (only once per base).
Your goal is to maximize the total score after up to 15000 frames.
Invalid commands are ignored (the simulation continues).
Input Format
Map
- Line 1:
n m((1 \le n,m \le 200)) - Next
nlines:mcharacters each, describing the grid.
Bases
Blue bases first, then red bases.
For each side:
- Line: integer
N= number of bases - For each base:
- Line:
x y(0-indexed) - Line:
g c d vg: fuel supplyc: missile supplyd: defense (missiles needed to destroy)v: military value
- Line:
Fighters
- Line: integer
k((1 \le k \le 10)) - Next
klines:x y G Cfor fighterid = i-1
Constraints (from released datasets):
1 ≤ G ≤ 10001 ≤ C ≤ 1000
Output Format
For each frame, output zero or more command lines, then a line:
OK
Commands:
move <id> <dir>attack <id> <dir> <count>fuel <id> <count>missile <id> <count>
There are at most 15000 frames. Your output may end early (remaining frames are treated as doing nothing).
Sample Input
See testdata/1.in.
Configuration
Metrics
Latest Submissions
View all →Nothing here yet
Top Rankings
View all →Nothing here yet