Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

grid-pathfinding-strategy

/grid-pathfinding-strategy

Dobiera algorytmy wyznaczania ścieżek na siatce, takie jak A*, Dijkstra czy pola przepływu, do ruchu taktycznego w grach.

Licencja
MIT
Ostatnia zmiana repozytorium
30.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
14
Skrypty
3
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: examples/grid-demo.mjs, scripts/grid-navigation.mjs, tests/grid.test.mjs

Co robi i kiedy

Dobiera algorytmy wyznaczania ścieżek na siatce, takie jak A*, Dijkstra czy pola przepływu, do ruchu taktycznego w grach.

Oryginalny opis (EN)

Use for grid A*, Dijkstra, BFS, flow fields, terrain costs and tactical movement routes; not 3D NavMesh steering.

Jak działa

  1. Mission and scope
  2. Required workflow
  3. Files to use selectively
  4. Interface and cautions
  5. QA / exit contract
Sekcje z nagłówków SKILL.md, w oryginale · 29 linii, 430 słów
Podgląd SKILL.md
---
name: grid-pathfinding-strategy
description: Use for grid A*, Dijkstra, BFS, flow fields, terrain costs and tactical movement routes; not 3D NavMesh steering.
---
# Grid Pathfinding & Strategy Navigation

## Mission and scope
Implement safe navigation on discrete 2D grid maps. This skill owns **path queries and route costs**, not unit physics, AI intent, scene creation, or rendering. For 3D navmesh use `dynamic-navmesh-steering`; for independent validation use `navigation-debugging-qa` (optional, no hard dependency).

## Required workflow
1. Inspect the **existing** map representation, map version, cell dimensions, diagonal/corner policy, terrain weights, unit footprint and portal rules. Do not silently replace its graph or save schema.
2. Choose BFS for equal-cost steps, Dijkstra for weighted maps or multi-goal reference cost, A* for single weighted destination, or reversed-edge flow fields for many units moving toward a common objective.
3. Identify whether portal costs / teleports are possible. If so, a purely geometric A* heuristic may **overestimate**; use Dijkstra/zero heuristic until a proven admissible heuristic exists.
4. Validate positive finite movement costs, start/goal passability and bounded node expansions; report `blocked`, `unreachable`, `budget`, or `ok` explicitly.
5. In destructible maps bump the graph revision on topology/cost edits, invalidate dependent routes/flow fields, and schedule recalculation using an explicit budget. Do not request paths every animation frame.
6. Unit steering must consume the route but remain controlled by the existing movement/physics API. Do not teleport rigid bodies by overwriting transforms.
7. Test against independent Dijkstra and multi-seed maps, plus special cases (corner cutting, unit footprint, one-way portals). Keep a before/after benchmark.

## Files to use selectively
- [`scripts/grid-navigation.mjs`](scripts/grid-navigation.mjs): standalone `DynamicGrid`, `findPath`, `buildFlowField`. Algorithms are deliberately small and non-rendering.
- [`references/algorithm-policy.md`](references/algorithm-policy.md): algorithm selection, costs, routing and budgets.
- [`references/destructible-maps.md`](references/destructible-maps.md): map invalidation, dynamic changes, portals, strategic units and integration.
- [`examples/grid-demo.mjs`](examples/grid-demo.mjs): executable sample. `node examples/grid-demo.mjs`.
- [`tests/grid.test.mjs`](tests/grid.test.mjs): `node --test tests/grid.test.mjs`.

## Interface and cautions
Use grid cells `[x, y]`; `findPath` returns `{status, path, cost, expanded, revision}`. `buildFlowField` returns `{dist, next, route(), revision}`. Passing an out-of-bounds cell throws; blocked and unreachable paths have explicit statuses. Costs describe entering destination cells, with diagonal step multiplier `sqrt(2)` and positive-cost directed off-grid links for portals. A footprint measured in grid cell radius is an approximate square clearance check, **not** an exact polygonal agent radius.

Use seeded deterministic generation for source maps, not `Math.random()` hidden within routing. Graph iteration order intentionally fixed. Never assume all unreachable terrain can be bridged by the generator. Compare results by numerical cost and legality, not by requiring one particular tie-broken path.

## QA / exit contract
Report map dimensions and revision, selected algorithm, found cost or failure reason, peak expansion budget, invalidation strategy and tests actually run. Never report successful GPU, physics, navmesh or live gameplay tests from pure grid unit tests.
Pliki w paczce (14)
  • CHANGELOG.md 1 KB
  • LICENSE 1 KB
  • PROVENANCE.md 2 KB
  • README.md 1 KB
  • SKILL.md 4 KB
  • attribution/upstream/LICENSE 11 KB
  • attribution/upstream/NOTICE 1 KB
  • examples/grid-demo.mjs 1 KB
  • examples/typed-grid.mts 1 KB
  • references/algorithm-policy.md 2 KB
  • references/destructible-maps.md 2 KB
  • scripts/grid-navigation.d.mts 1 KB
  • scripts/grid-navigation.mjs 8 KB
  • tests/grid.test.mjs 3 KB

Wersje

W bazie nie ma innych skilli o nazwie grid-pathfinding-strategy.

Migawka bazy z 13.11.2026 · wersja paczki 948733fee548 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100dynamic-navmesh-steering
    Prowadzi postacie 3D po siatce nawigacyjnej NavMesh z omijaniem dynamicznych przeszkód i tłumów, z adapterami fizyki Rapier.
  • 100game-ai
    Projektuje decyzje NPC i przeciwników przez automaty skończone, drzewa zachowań, steering behaviors i pathfinding A*, jako algorytmy niezależne od silnika.
  • 100navigation-debugging-qa
    Sprawdza trasy agentów, koszty ścieżek, wersje nawigacji i utknięcia ruchu na podstawie telemetrii, bez pisania algorytmu wyszukiwania.
  • 100game-ai
    Projektuje decyzje postaci NPC i wrogów: maszyny stanów, drzewa zachowań, sterowanie oraz wyszukiwanie ścieżek A*.
  • 100isometric-pathfinding
    Prowadzi jednostki po siatce izometrycznej z omijaniem przeszkód za pomocą algorytmu A* na warstwie przejezdnej, z właściwymi regułami sąsiedztwa.
  • 100game-ai-patterns
    Podaje wzorce kodu AI w grach: węzły drzew zachowań, tabele przejść FSM, krzywe utility AI, akcje GOAP, agenci NavMesh w Godot i wykrywanie pola widzenia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.