Giter VIP home page Giter VIP logo

lem-in's Introduction

lem-in

An Algo Project at Codam (42) - ant farm

Thanks @sergeresko for the verifier.

An introduction to the grapth theory. Depth first search (DFS), breadth first search (BFS), maximum flow problem.

The goal is to send a given amount of ants from starting room to ending room using shortest possible amount of steps. A step is a line containing names of ants and names of rooms they should move to (format Lant1-room1 Lant2-room2 ...). The game has several restrictions: one room can contain one ant (excepting start-room and end-room), one ant can move only once per line.

A generator is provided to evaluate the project. It has 5 levels of difficulty: flow-one (one ant on the map), flow-ten (up to 20 ants, distinct paths, up to 1000 rooms), flow-thousand (up to 150 ants, distinct paths, up to 1500 rooms), big (up to 500 ants, crossing paths, 1000+ rooms), big-superposition (up to 500 ants, overlaying paths, 2000+ rooms). The generator outputs a map, containing amount of ants, room names, room connections.

The lem-in binary has to read the map on the standard output, find a shortest path or the best combination of paths, and print back the map with the answer.

A test is present in the repository. It checks the project for the internal 42 rules (tne Norme), for error handling, and for the standard defence cases.

usage:

cd project_path/test
sh test.sh

lem-in's People

Contributors

k-off avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.