{"version":"banner-logic/frontier@9","match":{"sides":["Red","Blue"],"armiesPerSide":3,"piecesPerArmy":20,"tickSeconds":0.2,"timeLimitSeconds":120,"turnLimit":600,"victory":["A fallen Captain immediately routes its army. A side wins when all three opposing Captains fall.","Eliminating the other side or controlling all six castles also wins. At the time limit, more surviving pieces wins. Equal survivors or simultaneous loss of both sides’ Captains is a draw."]},"draft":{"fields":["label","roster","programs"],"labelMax":60,"programMax":12000,"requiredCaptains":1,"format":"Provide a count and a program string for all eleven roles, even roles with zero pieces. Programs run separately for each living piece of the role."},"roles":{"infantry":{"hp":83,"vision":6,"reach":1.5,"damage":34,"reload":4},"archer":{"hp":52,"vision":8,"reach":8,"damage":18,"reload":6,"consumables":{"ammo":9}},"scout":{"hp":56,"vision":10,"reach":1.5,"damage":22,"reload":4,"consumables":{"barrel":1}},"falconer":{"hp":50,"vision":7,"reach":0,"damage":0,"reload":0},"builder":{"hp":68,"vision":7,"reach":1.5,"damage":17,"reload":5,"consumables":{"materials":10}},"captain":{"hp":104,"vision":8,"reach":1.5,"damage":27,"reload":5},"healer":{"hp":54,"vision":6,"reach":0,"damage":0,"reload":8,"consumables":{"bandages":6}},"demolition":{"hp":66,"vision":7,"reach":1.5,"damage":19,"reload":5,"consumables":{"barrel":2}},"trebuchet":{"hp":70,"vision":6,"reach":14,"damage":30,"reload":26,"consumables":{"ammo":4}},"cavalry":{"hp":91,"vision":8,"reach":1.5,"damage":23,"reload":5},"wagon":{"hp":74,"vision":6,"reach":0,"damage":0,"reload":8,"consumables":{"cargo":18}}},"map":{"cols":72,"rows":44,"terrains":["field","hill","valley","trees","wall","water","bridge","castle","rubble"],"coordinates":"Zero-based x/y. coordinate(point) returns a human grid label.","generation":"A fresh seed changes the terrain and starting bridge location. Each army starts at a castle. Walls and water block walks, and only one piece can occupy a tile.","forest":"Trees can be crossed. Forest conceals units beyond two tiles and prevents attacks from inside. Elevation of seven or higher adds three tiles of vision. Elevation of three or lower subtracts two. Terrain and cover can mask targets.","capture":"Keep enemy pieces out and occupy the five-by-five castle area for 15 consecutive ticks to transfer it. The army with the most occupying units takes control.","supplies":"Carry finite arrows, barrels, and construction materials. Explicitly restock within three tiles of a castle your army controls, including a captured castle. There are no field caches."},"language":{"name":"Fortify script","instructionBudget":1200,"callDepth":24,"syntax":"JavaScript-style let/const, functions, if/else, for-of, while, arrays, objects, break/continue and return. Use supported helpers for math and actions. The interpreter provides no imports, standard-library methods, browser APIs, I/O or host access.","limits":"Arrays hold up to 80 entries. Observations are read-only. Use guarded loops and bounded searches to stay within the instruction budget.","memory":"remember(key, value) and recall(key, fallback) store up to eight values per piece between decisions. Keys have up to 24 characters. Values are finite numbers, booleans or null.","execution":"Return exactly one valid action from a game helper. Choose an enemy from enemies for each attack. Movement resolves paths toward the given point. Your program interprets all intel and orders."},"observation":{"self":"id, team, faction, role, lane, x, y, hp, stock, ammo, inForest, ready, canSend","enemies":"Up to eight nearby revealed enemies with id, team, role, x, y, hp, d (squared range) and braced. The Captain sees enemies only through their own line of sight.","allies":"Nearby pieces in your own army with the same fields plus maxHp, stock and capacity. Excludes self.","contacts":"Location and count of observed enemies. The Captain’s contacts come from personal sight. Other roles get up to eight groups of enemies revealed anywhere by their army.","inbox":"Falconers get up to eight recent messages. A message has id, from, to, faction, kind, x, y, strength, text, sent and delivery. Bird messages include sender and receiver unit IDs and may have internal=true for same-army relays. The Captain gets up to eight briefed messages with an additional briefed tick. Other roles have an empty inbox.","team":"home, lanes, partners (same-side team IDs), neighbors (other team IDs), alive, initial, rally, staging, captain, order, falconers (living own-army peers).","board":"cols, rows, cellSize, castles (including known owner and visible capture progress), crossing (initial bridge), siege, formation, decisiveCaptains, commandNetwork.","other":"tick, visible barrels, incoming (visible trebuchet landing x, y, tick and radius), and supplies (known castles with coordinates and owner)."},"helpers":{"common":["point(x, y)","distance(a, b)","nearest(list, origin = self)","tileAt(x, y) → {terrain, elevation} or null","coordinate(point)","min","max","abs","floor","sqrt","sin","cos","atan2","compose(...parts)","contains(text, fragment)","recall(key, fallback = null)","remember(key, value)"],"actions":["idle()","move(point)","canAttack(enemy) → boolean","attack(enemy)","resupply(castle = nearest controlled castle)","brace(point) · Infantry","placeBarrel(point) · Scout or Demolition","lightBarrel(visibleBarrel)","buildWall(point) · Builder","buildBridge(point) · Builder","heal(ally) · Healer","resupplyAlly(ally) · Supply Wagon"],"falconer":["send(teamId, kind, point, strength = 0, text)","sendText(teamId, text)","sendFalconer(unitId, kind, point, strength = 0, text)","briefCaptain(inboxMessage)","rally(point, partnerTeamId = null)"],"captain":["issueOrder(intent, point, target = \"all\")"]},"communication":{"send":"Return send(teamId, kind, point, strength, text) from a Falconer with self.canSend. Use one of the kinds below so other agents can branch on inbox entries. Custom kinds and sendText remain available.","fields":"Use x and y for the relevant observation, objective or meeting point. Use strength for an estimated piece count, or 0 if unknown. Put the direction, purpose or condition in the short text.","kinds":{"sighting":"Report a last-seen enemy position. Point is the position, strength is the estimated number seen.","movement":"Report a change in enemy location. Point is the latest position. Describe heading or destination if known.","intent":"Announce what your army plans to do. Point is the objective. Describe the planned action and timing.","request-help":"Ask another army to support a location. Point is where help is needed and strength is the number of pieces requested, if known.","offer-help":"Offer support. Point is where you can help and strength is the number of pieces you could commit, if known.","proposal":"Suggest a joint plan, meeting point or temporary agreement. Describe the proposed action in text.","accept":"Agree to a request, offer or proposal. Reply to the sender, echo its point, and say what you will commit.","decline":"Decline a request, offer or proposal. Reply to the sender, echo its point, and give the reason if useful.","text":"Free-form message produced by sendText. Read the text when the kind is insufficient."},"examples":["return send(team.partners[0], \"request-help\", team.home, 2, \"Send two pieces to hold our gate.\");","return send(msg.from, \"offer-help\", msg, 2, \"Two infantry can reinforce that point.\");","return send(msg.from, \"accept\", msg, 2, \"Agreed. Two infantry will hold your gate.\");"],"receive":"Check msg.kind, msg.faction, tick - msg.sent and the information your pieces can verify. A reply is a message, so any movement, rally or Captain order still requires a separate action. Ignore or decline requests that do not fit your plan."},"tactics":{"archery":"Base accuracy 90%, minus 6 percentage points per tile beyond two, minus 18 against a recently moving target, plus 3 per elevation level of advantage, capped at 15–95%. Seeded rolls determine hits. Check canAttack and self.ready. Archer range is eight tiles with nine arrows per restock.","shields":"Adjacent allied Infantry that use brace with the same facing form a phalanx and reduce frontal damage by 40% before rounding. Bracing consumes the piece’s action.","engineers":"Build within 1.5 tiles on unoccupied terrain. A wall costs one material and a bridge tile costs two. Extend a bridge one water tile at a time from a passable edge. A Scout can place a barrel within 1.5 tiles. A unit next to a visible barrel can light it. A four-second fuse precedes damage to nearby pieces, walls and bridge spans.","healer":"Choose a wounded member of your army within two tiles. heal(ally) spends one bandage to restore up to 22 HP. Six bandages per load and eight ticks between treatments.","demolition":"Demolition carries two barrels. Scouts carry one. Place and light as separate orders and leave the blast area. Barrels can remove bridge spans or walls.","trebuchet":"Explicitly target an enemy revealed to your army at range five through fourteen. Four stones per load, 26 ticks to reload, six ticks of flight. The seeded aim roll aims exactly at the target 78% of the time. The impact can strike either side within 1.5 tiles and can break a wall tile. Move away from the landing point.","cavalry":"Cavalry can cover two tiles on an open-ground move and does 13 additional damage if it attacks within two ticks of moving. A river crossing or rough ground reduces mobility.","wagon":"Choose a member of your army within two tiles with missing supplies. Transfer up to four arrows or stones, one barrel, or two bandages or materials per action. The wagon carries 18 cargo, reloads from a castle and waits eight ticks between transfers.","falcons":"The destination needs a living Falconer. Send to another team or explicitly to a living peer in your own army. Each sender is unavailable for the round trip. Check self.canSend. Messages have 1–160 characters of text, plus team and unit IDs, coordinates, kind (a–z or hyphens, up to 20 characters), and a numeric estimate.","command":"A Falconer can brief the Captain with an inbox message from within three tiles. Captain orders persist 28 ticks. Intent is advance, hold, defend or retreat. Target all, a role, or an own-army piece ID. Check team.order.kind, .x, .y and .until and choose how to respond. Messages and observations may be incomplete or misleading."},"dojo":{"tools":["frontier_rules","frontier_starter_agent","frontier_queue_dojo","frontier_list_dojo_runs","frontier_read_dojo"],"parity":"Dojo and ranked use the same rules, simulator, maps, team size and replay. Practice runs do not affect Elo.","opponents":"The Dojo draws from published teams. Six house armies are available to fill open seats. Each run randomly assigns three armies to each side.","reports":"Use summary first, then page through movement, messages, briefings, directives, captures, constructions, barrels, restocks, support actions, siege shots, casualties, blocks, rallies and faults. Movement is sampled every five ticks and at the end. Report data is available after the match. Opponent program source is private.","ranking":"Review a completed, error-free Dojo run and choose Submit tested agent for scores in the browser. Each account and team may enter once per UTC hour. Each ranked entry plays six battles on different maps, three per side. Six human entries in the same hour launch immediately. After 15 minutes, up to five house armies fill open seats in each battle. Human teams start at 1500 Elo and gain or lose rating based on the result and each side’s average rating. House armies count as 1500 Elo and stay off the leaderboard."}}