{"uid":"cap_ZJe3Nc-mJ4HwIiDx2Ng3Z","slug":"toy-grid-pathfinding-bfs-dry-run-cf1df6ff","name":"Toy Grid Pathfinding (BFS) - Dry Run","description":"Deterministic four-neighbor BFS on a grid of at most 24×24 cells. Returns a shortest obstacle-free route or an explicit unreachable/step-limit result. Toy discrete geometry only; no hardware, collision certification or physical feasibility claim.","url":"https://www.mahastrategies.com/api/v1/micro/toy-grid-path-dry-run?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["dataClass","width","height","start","goal","obstacles","maxSteps"],"properties":{"goal":{"type":"object"},"start":{"type":"object"},"width":{"type":"integer","maximum":24,"minimum":1},"height":{"type":"integer","maximum":24,"minimum":1},"maxSteps":{"type":"integer","maximum":575,"minimum":0},"dataClass":{"enum":["public","synthetic"],"type":"string"},"obstacles":{"type":"array","maxItems":576,"minItems":0}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["version","offerId","amountBaseUnits","inputDigest","result","boundaries","receiptDigest"],"properties":{"result":{"type":"object"},"offerId":{"enum":["toy-grid-path-dry-run"],"type":"string"},"version":{"enum":["maha-microproducts/0.1"],"type":"string"},"boundaries":{"type":"array","maxItems":128,"minItems":0},"inputDigest":{"type":"string","maxLength":71},"receiptDigest":{"type":"string","maxLength":71},"amountBaseUnits":{"enum":["34500"],"type":"string"}},"additionalProperties":false}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0345","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0345/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0345","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0345","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EgIts_ArW_bx-x5l2sceR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0345","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs deterministic four-neighbor BFS on a grid up to 24×24 to find a shortest obstacle-free path between start and goal cells, returning the path or an explicit unreachable/step-limit result.","exampleAgentPrompt":"Find the shortest path on a 10×10 grid from cell (0,0) to cell (9,9), treating cells (3,3), (3,4), (4,3), and (5,5) as obstacles, with a max of 200 steps — mark it as synthetic data.","exampleUseCases":[{"title":"Maze reachability check for puzzle generator","prompt":"I'm building a 12×8 puzzle maze and need to confirm that cell (0,0) can reach cell (11,7) while avoiding these blocked cells: (2,1),(2,2),(2,3),(5,0),(5,1),(5,2),(8,5),(8,6). Set max steps to 200 and use synthetic data."},{"title":"Optimal robot route in warehouse grid","prompt":"On a 20×15 grid representing a warehouse floor, find the shortest path from (0,0) to (19,14) dodging shelving units at (5,5),(5,6),(10,10),(10,11),(15,3),(15,4). Cap it at 575 steps and label the data as public."},{"title":"Game AI pathfinding validation","prompt":"I'm testing a game AI on a 6×6 grid — can you compute the BFS shortest path from (1,1) to (4,4) with walls at (2,2),(2,3),(3,2)? Use a max of 50 steps and synthetic data class."}],"resultDescription":"Returns a versioned receipt object containing: the computed shortest path (or an explicit 'unreachable' or 'step limit exceeded' result), the offer ID ('toy-grid-path-dry-run'), amount charged in base units (34500), a SHA-style input digest for auditability, a receipt digest, and a boundaries array. The result object indicates whether a path was found and lists the sequence of cells traversed.","failureModes":["Grid dimensions exceed 24×24 maximum — request rejected","maxSteps exceeds 575 — request rejected","Obstacle list exceeds 576 items — request rejected","Start or goal coordinates outside grid bounds — may return unreachable or error","Goal is genuinely unreachable due to obstacle configuration — returns explicit unreachable result","Step limit reached before goal found — returns explicit step-limit result","Invalid dataClass value (must be 'public' or 'synthetic') — schema validation error","Payment failure via x402 protocol — call not executed"],"whenToPreferThis":"Choose this endpoint when you need a simple, deterministic, auditable BFS shortest-path computation on a small discrete grid (up to 24×24) and want a cryptographically receipted result. It is ideal for puzzle generation validation, game AI testing, teaching demonstrations, or any scenario where you need a verifiable proof-of-computation rather than a raw algorithm result. Not suitable for large graphs, weighted edges, diagonal movement, real-world navigation, or physical robot path planning.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:20:28.159Z","isFirstParty":false,"canonicalSlug":"toy-grid-pathfinding-bfs-dry-run-cf1df6ff"}