# Toy Grid Pathfinding (BFS) - Dry Run

> Toy Grid Pathfinding (BFS) - Dry Run is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.0345/call, status unknown (last checked 2026-10-29).

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.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/toy-grid-path-dry-run?utm_source=zero.xyz
- Price: $0.0345/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toy-grid-pathfinding-bfs-dry-run-cf1df6ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZJe3Nc-mJ4HwIiDx2Ng3Z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability toy-grid-pathfinding-bfs-dry-run-cf1df6ff -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toy-grid-pathfinding-bfs-dry-run-cf1df6ff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.mahastrategies.com](https://www.zero.xyz/host/www.mahastrategies.com/llms.txt)
