skills/llm/swarm-tactic-diversity/SKILL.md
Assign each new agent a different directional rotation pattern from a set of permutations to ensure swarm coverage diversity across the map
npx skillsauth add wenmin-wu/ds-skills llm-swarm-tactic-diversityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When spawning multiple agents with the same patrol/exploration pattern, they all cover the same area. By maintaining a pool of movement pattern permutations (e.g., 8 rotations of NESW) and assigning each new agent the next pattern in round-robin order, the swarm naturally distributes across the map. This avoids clustering without explicit coordination or communication between agents.
TACTICS = [
['NORTH', 'EAST', 'SOUTH', 'WEST'],
['SOUTH', 'EAST', 'NORTH', 'WEST'],
['NORTH', 'WEST', 'SOUTH', 'EAST'],
['SOUTH', 'WEST', 'NORTH', 'EAST'],
['EAST', 'NORTH', 'WEST', 'SOUTH'],
['WEST', 'SOUTH', 'EAST', 'NORTH'],
['EAST', 'SOUTH', 'WEST', 'NORTH'],
['WEST', 'NORTH', 'EAST', 'SOUTH'],
]
class SwarmManager:
def __init__(self):
self.tactic_index = 0
self.agents = {}
def register(self, agent_id):
self.agents[agent_id] = {
'directions': TACTICS[self.tactic_index],
'step': 0,
}
self.tactic_index = (self.tactic_index + 1) % len(TACTICS)
def get_direction(self, agent_id):
agent = self.agents[agent_id]
d = agent['directions'][agent['step'] % len(agent['directions'])]
agent['step'] += 1
return d
swarm = SwarmManager()
for ship_id in new_ships:
swarm.register(ship_id)
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF