Write a command-line tool /app/pathfinder that reads a grid from a JSON file and outputs the shortest path…
Write a command-line tool /app/pathfinder that reads a grid from a JSON file and outputs the shortest path…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input JSON schema: json { "grid": 1, 2, 3 , 4, -1, 5 , 6, 7, 8 , "start": 0, 0 , "end": 2, 2 , "diagonal"…
The task
**Input JSON schema:** ```json { "grid": [ [1, 2, 3], [4, -1, 5], [6, 7, 8] ], "start": [0, 0], "end": [2, 2], "diagonal": true, "algorithm": "dijkstra" } ``` - `grid`: 2D array of integers (weight/cost). `-1` means impassable (obstacle). All other values are non-negative integer traversal costs (including zero-cost…
Part of ai-and/termgrade-environments.