skills/llm/spiral-patrol-exploration/SKILL.md
Agents patrol in expanding spiral patterns using rotating direction sequences with increasing radius for systematic grid exploration
npx skillsauth add wenmin-wu/ds-skills llm-spiral-patrol-explorationInstall 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.
In grid-based games, random movement wastes turns revisiting cells. A spiral patrol assigns each agent a rotating direction sequence (N, E, S, W) with an increasing step count per direction. The agent moves N steps north, then N steps east, then N steps south, then N steps west, then increases N. This produces an outward spiral that systematically covers the map from the agent's starting position.
def create_spiral_agent():
return {
'direction_index': 0,
'moves_done': 0,
'max_moves': 3,
'directions': ['NORTH', 'EAST', 'SOUTH', 'WEST'],
}
def spiral_step(agent):
"""Return next direction in the spiral pattern."""
direction = agent['directions'][agent['direction_index']]
agent['moves_done'] += 1
if agent['moves_done'] >= agent['max_moves']:
agent['moves_done'] = 0
agent['direction_index'] += 1
if agent['direction_index'] >= len(agent['directions']):
agent['direction_index'] = 0
agent['max_moves'] += 1
if agent['max_moves'] > 10:
agent['max_moves'] = 3 # reset to inner spiral
return direction
agent = create_spiral_agent()
for _ in range(20):
move = spiral_step(agent)
max_moves steps, rotate to next directionmax_moves (expand spiral)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