HF RL Explorer

Write a command-line program (Python script) that reads a grid from a text file and finds the shortest path…

Write a command-line program (Python script) that reads a grid from a text file and finds the shortest path…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input file format: - First line: two integers rows cols separated by whitespace - Following rows lines…

The task

**Input file format:** - First line: two integers `rows cols` separated by whitespace - Following `rows` lines: each line contains exactly `cols` characters - Characters: 'S' (start, exactly one), 'G' (goal, exactly one), '.' (open, cost 1), 'W' (water, cost 5), 'M' (mountain, cost 10), '#' (wall, impassable) - The…

Part of ai-and/termgrade-environments.