Repository navigation
Conversation
…om a roster Command and Unit are traits in recreation_towers (no I/O). The default unit, Autopilot, is Instruction::tick_with; the edge policies are units (EdgeUnit). Match is built from units, and Roster puts commanders and units together. Captain is kept, as Directing (its Command) and Captain::unit. The seat reply carries each order's queue. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 2 of
plans/actors.md:Captainis split into a commander for each team and a unit for each drone, and a game is played from a roster. Based onactors-queue.What changed
recreation_towers::actors(no I/O, for the arena and later the server):trait Command { fn decide(&mut self, &TeamView) -> Result<Vec<Directive>, String> },Directive { drone, order, queue }.Commanderimplements it.trait Unit { fn fly(&mut self, &OnBoard, &mut Instruction) -> Option<Order>; fn restart(&mut self) }.OnBoardhas private fields: team, number, flying, clock, silent/in_contact, battery, link timeout and bingo,obs()(itsEdgeObs),done(order). A unit cannot reach another drone or the team's map.Autopilot, the default unit:Instruction::tick_with.cognition_towers:Match::with_units(a unit for each of ten drones) andstep_with(&mut dyn Command, &mut dyn Command);Roster(new,of_captains,with_unit) andplay_roster.Captainis kept:Directing(captain)is itsCommand;Captain::unit(team, k)replacesCaptain::edge.Edgedmakes anEdgeUnit(autopilot, then the policy once a second when out of contact) with its own clone of the policy. No existingedgeread captain state.compare_edgetakes anRc<dyn Edge>.[drone, order]or[drone, order, queue](Reply); old replies read as before.serve_withserves anyCommand;SeatProcesshands the queues to the match.plans/actors.mdresults,domains/cognition/README.md.Not done / differs from the brief
Silent(after)time, theDonetest) is worked at that rate today; running the default unit at 1 Hz moves the numbers. The edge policies still run once a second, insideEdgeUnit.cognition_leaguetests/acceptance.rsfails with "The suite's 120 s ran out before this test started", as on the base branch; its unit tests pass.Gates (before = base
actors-queue, after = this branch)denial,ruleset v2 200,edge 30andcognition_league judge --game captain --champion timid --challenger default --seeds 24are byte-identical before and after (cmp). Judge: kept out (mean difference +0.175, lower bound -0.132); champion 24 won / 24 lost, 512 points; challenger 26 won / 22 lost, 547 against 493.Tests:
-p recreation_towers -p cognition_towers -p recreation_towers_groundpass (36 + 140 + 7 acceptance + 7);cognition_leagueunit tests pass;recreation_towers_serverandteleoperation_commandbuild; fmt and clippy clean;expectation check expectations: 0 errors.New tests: a counting unit runs on every step for every drone in and out of contact; teams on different units, and one drone on a different unit, are deterministic and change the game; old and new reply; a served and a spawned seat with a queue.
🤖 Generated with Claude Code