Giter Club home page Giter Club logo

lem_in's Introduction

lem_in

on utilise tous GPS dans nos trajets couront pour nous trouver le chemin le plus rapide: à travers cette technologie ce cache un algorithme complexe qui teste les combinaisons de tous les chemins existant pour effectuer ce trajet pour en suit choisir le plus rapide d'entre eux. Avec ce projet lem-in je reproduit l'algorithme de GPS

Subject:

Hex is an elaborate, magic-powered and self-building computer (not unlike the ‘shamble’, a kind of magical device used by the Witches of the Discworld) and is housed in the basement of the High Energy Magic Building at the Unseen University (UU) in the twin city of Ankh-Morpork. Hex is a computer unlike any other. Programmed via ‘Softlore’, Hex runs and evolves under the watchful eyes of wizard Ponder Stibbons, who becomes the de facto IT manager at UU because he’s the only one who understands what he’s talking about. Hex has its origins in a device created by some student Wizards in the High Energy Magic building. In this form it was simply a complex network of glass tubes, containing ants. The wizards could then use punched cards to control which tubes the ants could crawl through, enabling it to perform simple mathematical functions. https://en.wikipedia.org/wiki/Hex_(Discworld)

Let’s pay close attention to its calculation unit: an anthill with rooms and tunnels. A room can be connected to an infinite number of other rooms by as many tunnels as needed, but a tunnel can only connect two rooms. It would be nice to build one of our own, but since we’re not really into DIY, let’s make a high-tech version: a “Hex’ calculation unit” simulator.

The rooms’ coordinates will always be whole numbers. Please note that it is possible to insert comments by using “#” and commands by using “##”. ##start indicates the next room is the anthill entrance, and ##end indicates the next room is the anthill exit.

Any unknown commands will be ignored. The objective of your program is to find the quickest way to make the ants cross over the anthill. To do so, each single ant need to take the shortest route (and not necessarily the easiest), whithout walking on its peers, and avoiding traffic jams. At the beginning of the game, all of the ants are in the anthill entrance. The goal is to lead them to the exit room, in a minimum amount of laps. Each room could contain a single ant at a time (except ##start and ##end, which can contain as many as needed).

With each lap, you can move each ant only once by following a tunnel (if the receiving room is clear). You must show the result on the standard output, in this order: number_of_ants, rooms, tunnels and then for each lap, a series of Pn-r where n is the number of the ant, and r the name of the room it gets into. In the output, you must display a comment indicating the part that will follow. These comment must be exactly like in the examples.

Screenshot from 2022-09-30 14-44-30

Instalation

  git clone [email protected]:Yahia-Abdchafee-ADAM/lem_in.git lem-in
  cd lem-in
  make

Example

example of input file:<\h3>

Screenshot from 2022-09-30 14-45-24

example:

Screenshot from 2022-09-30 14-45-38

lem-in.webm

lem_in's People

Contributors

yahia-adam 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.