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.
- Autor
- PixelWao ↗
- Repozytorium
- codex-gamedev-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 30.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 14
- Skrypty
- 3
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 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
- Mission and scope
- Required workflow
- Files to use selectively
- Interface and cautions
- QA / exit contract
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.