Implemented algorithm analyzes a unique input with a variable number of ants and helps the colony navigate from the start of a maze to the. The solver is multi-pathed, recursive, and weighted for distance, implemented in adjacency list. It doesn't forget about avoiding traffic jams as well as walking all over their fellow ants. A graphical output to watch the ants find their home included! ✅
git clone https://github.com/psprawka/Lem-in.git lem-in-psprawka
cd lem-in-psprawka
make
./lem-in < <map_example>
The exemplary maps are avaliable in maps/ directory. Personally, I'll recommend maps/big/42_france.map.
The output will be displayed in following format:
number_of_ants
the_rooms
the_links
Lx-y Lz-w Lr-o ...
where:
x,z,rrepresent the ants’ numbers (going from 1 to number_of_ants),y,w,orepresent the rooms’ names.
- all ants start in
##startroom, - lines starting with
##are commands modifying the line that comes right after, ##startsignals the ant farm’s entrance and##endits exit,#means comment till the end of the line,- all unknown commands are ignored,
- non compliant or empty lines will stop the ant farm’s reading,
- each room can contain only one ant at a time (excluding
##startand##end).
Farm pattern:
number_of_ants
the_rooms
the_links
Remember to include mandatory commands ##start and ##end. If you wish to color a room, add ##<color_name> before a requested room (color_name has to be lowercase).
You can find list of all colors in includes/libft.h file. 🌈🌈🌈


