← Back to Projects

Project 003: Simple Route Searcher

C • Pathfinding Basics • Coursework (Individual)

Overview

A small C program that reads a grid map, prints it in a required format, and performs simple path-searching behaviours across multiple “levels” of difficulty. The output is designed to match the specification exactly (including success and “got stuck” cases).

Below are real test outputs (screenshots) demonstrating that the implementation meets the required behaviour.

My Role

  • Individual coursework — implemented all required functions
  • Focused on correctness, edge cases, and output formatting
  • Completed the written reflection: limitations and improvement ideas

Test Outputs (Screenshots)

These screenshots show the program’s output for three tests. They demonstrate map rendering, path marking, step counting, and the expected “got stuck” scenario.

Project 003 test output 1
Test 1 — Level 1 map rendering + start/end position output
Project 003 test output 2
Test 2 — Level 2 SimpleDirections reaches the goal (example: 8 steps)
Project 003 test output 3
Test 3 — Level 2 “got stuck” case (expected behaviour when no valid moves remain)

Go to Code Page Download Spec (PDF) Download Rubric (PDF)

Specification (Levels)

The assignment is structured like a small game with multiple levels. Each level tests a different requirement:

  • Level 1: Build and print the map (FillMap + PrintMap), and store start/end positions.
  • Level 2: Implement naïve pathfinding (SimpleDirections) and print either “to find the goal” or “got stuck”.
  • Level 3: Implement Closest Neighbours search in priority order (Above → Right → Down → Left).
  • Level 4: Written reflection: limitations + how to improve the approach (pseudocode). Bonus: implement the improved solver.

The screenshots above correspond to the Level 1/2 behaviours, including a successful run and a valid stuck case.

Rubric Summary

The rubric focuses on passing visible/hidden tests across levels, plus code quality (comments/style) and written tasks. I treated this project as a “correctness-first” exercise: matching the required output format and handling edge cases.

What I Learned

  • Careful input parsing and 2D array handling in C
  • Designing deterministic movement rules and reporting “stuck” states cleanly
  • Why simple strategies can fail without backtracking, and how to propose improvements