42 school subject.
A program in c that takes an ant-farm description consisting of a start room, end room, rooms in between and tunnels between those rooms.
The ants need to move from start to end room in the shortest time possible, knowing in-between rooms can only contain one ant at a time.
We need to use graph-traversal-algorithms for this. I will implement the “Breadth First Search” algorithm and adapt it to this project of course.
Depth First Search or DFS for a Graph
Breadth First Search or BFS for a Graph
The 2 Most Popular Graph Traversal Algorithms
The 5 Most Powerful Pathfinding Algorithms
Shortest path in an unweighted graph