Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

156 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMAZED

A first-year Epitech (Montpellier) pathfinding project developed in 1 week by a 3-developer team.

The program reads a graph description from standard input and simulates the movement of multiple robots from a start room to an end room while printing each generation of moves.

Project Context

  • School: Epitech Montpellier
  • Year: 1st year
  • Team size: 3 developers
  • Timebox: 1 week
  • Language: C

What It Does

  • Parses a map composed of:
    • Number of robots
    • Rooms with coordinates
    • Tunnels between rooms
  • Validates input integrity (start/end rooms, room format, connectivity constraints)
  • Computes room weights from the end room to guide robot movement
  • Simulates robot moves generation by generation
  • Prints:
    • Parsed input summary
    • Move list in P<id>-<room> format

Build

From the repository root:

make

This builds:

  • binary: ./amazed
  • internal libraries from lib/my and lib/linked_list

Notes:

  • The default compiler in this project is epiclang.
  • To force gcc, build with:
make CICD=1

Run

The program reads input from stdin:

./amazed < map.txt

or

cat map.txt | ./amazed

Return codes:

  • 0 on success
  • 84 on error

Input Format

Expected input structure:

  1. First line: positive integer number of robots
  2. Room definitions: name x y
  3. Commands:
    • ##start before the start room definition
    • ##end before the end room definition
  4. Tunnel definitions: room1-room2
  5. Comments:
    • Lines beginning with # are comments
    • ##start and ##end are special commands

Important constraints enforced by the parser:

  • Exactly one start room and one end room
  • Room names must be alphanumeric
  • Tunnel lines must contain exactly one -
  • Duplicate room coordinates are rejected
  • Number of robots must be strictly positive

Output Format

The program prints parsed data, then moves:

#number_of_robots
<value>
#rooms
...
#tunnels
...
#moves
P1-roomA P2-roomB
P1-roomC
...

Each move token uses this format:

  • P<robot_number>-<room_name>

Tests

Criterion unit tests are included.

Run tests:

make tests_run

Rebuild and rerun tests:

make tests_re

Repository Structure

  • src/: core logic (parsing, validation, path weighting, simulation)
  • include/: headers and project structures
  • lib/: custom libraries (my, linked list)
  • tests/: Criterion unit tests

Team

Developed by a 3-person Epitech team in an intensive 1-week sprint.


If you are a recruiter or reviewer: this project demonstrates C fundamentals, parsing, custom data structures, graph traversal logic, and collaborative delivery under a short deadline.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages