https://github.com/vomnes/lem-in
Elementary algorithmic project - Graph Traversal - This project is meant to make you code an ant farm manager.
https://github.com/vomnes/lem-in
algorithm bfs-algorithm graph-traversal
Last synced: 3 months ago
JSON representation
Elementary algorithmic project - Graph Traversal - This project is meant to make you code an ant farm manager.
- Host: GitHub
- URL: https://github.com/vomnes/lem-in
- Owner: vomnes
- Created: 2017-03-07T19:18:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-16T17:16:26.000Z (about 8 years ago)
- Last Synced: 2025-03-05T07:04:15.634Z (4 months ago)
- Topics: algorithm, bfs-algorithm, graph-traversal
- Language: C
- Homepage:
- Size: 1.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lem-in
Elementary algorithmic project - Graph TraversalThis project is meant to make you code an ant farm manager.
The goal of this project is to find the quickest way to get n ants across the farm.
It's a graph traversal problem, i use the **breadth-first search** algorithm implemented with **adjacency lists** (linked list).## Usage
```
./lem-in [-details] < [map_name]
```## Input data
The program receive the data describing the ant farm from the standard output in the following format:
```
number_of_ants
the_rooms
the_links
```- The rooms, which are defined by: name coord_x coord_y.
- The links, which are defined by: name1-name2.
- All of it is broken by comments, which start with #.
- Lines that start with ## are commands modifying the properties of the line that comes right after.### Example
```
42
##start
1 23 3
2 16 7
#comment
3 16 3
4 16 5
5 9 3
6 1 5
7 4 8
##end
0 9 5
0-4
0-6
1-3
4-3
5-2
3-5
#another comment
4-2
2-1
7-6
7-2
7-4
6-5
```## lem-in
