{"id":37213691,"url":"https://github.com/ive663/lem-in","last_synced_at":"2026-01-15T00:40:30.196Z","repository":{"id":162124070,"uuid":"634909194","full_name":"ive663/lem-in","owner":"ive663","description":"This project is a digital version of an ant farm simulation.","archived":false,"fork":false,"pushed_at":"2023-12-03T13:19:30.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-04T13:35:14.389Z","etag":null,"topics":["01-edu","42","alem-school","edmonds-karp-algorithm","lem-in"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ive663.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-01T14:20:42.000Z","updated_at":"2023-06-04T19:47:43.000Z","dependencies_parsed_at":"2023-12-03T13:35:11.308Z","dependency_job_id":null,"html_url":"https://github.com/ive663/lem-in","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/ive663/lem-in","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ive663%2Flem-in","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ive663%2Flem-in/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ive663%2Flem-in/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ive663%2Flem-in/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ive663","download_url":"https://codeload.github.com/ive663/lem-in/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ive663%2Flem-in/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["01-edu","42","alem-school","edmonds-karp-algorithm","lem-in"],"created_at":"2026-01-15T00:40:29.482Z","updated_at":"2026-01-15T00:40:30.178Z","avatar_url":"https://github.com/ive663.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lem-in\n\nThis project is a digital version of an ant farm simulation. The goal of the project is to create a program called `lem-in` that can efficiently navigate ants through a colony by finding the shortest path from the start room to the end room. The project involves reading and parsing input files, implementing the Edmonds-Karp algorithm, and displaying the movements of the ants.\n\n## Features\n\n- Reads the ant colony description from a file\n- Implements the Edmonds-Karp algorithm to find the shortest path\n- Displays the content of the input file\n- Displays each move the ants make from room to room\n- Handles invalid or poorly formatted input data gracefully\n- Provides a clean and well-structured codebase\n\n## TODO list\n\n[TODO list](TODO.md)\n\n## Getting Started\n\nTo get started with the `lem-in` project, follow these steps:\n\n1. Clone the repository:\n   ```\n   git clone \u003crepository_url\u003e\n   ```\n\n2. Compile the program:\n   ```\n   go build\n   ```\n\n3. Run the program with an input file:\n   ```\n   ./lem-in \u003cinput_file\u003e\n   ```\n\n   Replace `\u003cinput_file\u003e` with the path to your input file.\n\n4. Observe the program's output, which includes the content of the input file and the movements of the ants.\n\n## Input File Format\n\nThe input file should follow a specific format. Here is an example:\n\n```\n4\n##start\n0 0 3\n2 2 5\n3 4 0\n##end\n1 8 3\n0-2\n2-3\n3-1\n```\n\nThe input file consists of the following elements:\n\n- Room definitions: Each room is defined as `\u003cname\u003e \u003ccoord_x\u003e \u003ccoord_y\u003e`. The format is flexible, and the room names can be alphanumeric.\n- Start and end room definitions: The start room is marked with `##start`, and the end room is marked with `##end`.\n- Tunnel definitions: Each tunnel is defined as `\u003croom_name1\u003e-\u003croom_name2\u003e`. The tunnels connect the rooms in the colony.\n\n## Output Format\n\nThe program outputs the following information:\n\n1. The number of ants (`number_of_ants`)\n2. The room definitions (`the_rooms`)\n3. The tunnel definitions (`the_links`)\n4. The movements of the ants in each turn (`Lx-y Lz-w Lr-o ...`)\n\nThe movements of the ants are represented as `Lx-y`, where `x` is the ant number and `y` is the room name.\n\n```\nL1-2\nL1-3 L2-2\nL1-1 L2-3 L3-2\nL2-1 L3-3 L4-2\nL3-1 L4-3\nL4-1\n```\n\n## Error Handling\n\nThe program is designed to handle various error scenarios gracefully. If the input data is invalid or poorly formatted, the program will display an error message indicating the specific issue. For example, it may show an error message like:\n\n```\nERROR: invalid data format\n```\n\nor\n\n```\nERROR: invalid number of ants\n```\n\nMake sure to check the error messages and adjust the input file accordingly.\n\n## Contributing\n\nContributions are welcome! If you have any ideas, improvements, or bug fixes, please submit a pull request. For major changes, please open an issue first to discuss the proposed changes. Feel free to explore, experiment, and improve the `lem-in` program. Enjoy the challenge of navigating ants through a digital ant farm!\n\n## Acknowledgments\n\nThis project was completed as part of a programming challenge at [Alem School](https://alem.school).\n\n---\n\t|NNNNNNNNNNNNNNWNXKK000KKXNNWNNNNNNNNNNNNNNNNNNNNNN|     |\n\t|NNNNNNNNNNNKxoc,'........',:lx0NNWk;''''''''''''lX|     |\t\n\t|NNNNNNNN0o;.                  .,lOd.            ;X|     |  \n\t|NNNNNXk:.                        .,,            ;X|     |  \n\t|NNNNO;                            ,Ox'          ;X|     |  \n\t|NNXd.                             ,KWKc         ;X|     |  \n\t|NXo.                              ,KWNXo.       ;X|     |\t\n\t|Nd.                               ,KWNNXc       ;X|     |\t\n\t|0'                                ,KWNNW0'      ;X|     |  \n\t|d                                 ,KWNNNNc      ;X|     |  \n\t|c                                 ,KWNNNNd      ;X|     |  \n\t|c                                 ,KWNNNNo      ;X|     |  \n\t|d.                                ,KWNNNXc      ;X|     |  \n\t|0,                                ,KWNNWO'      ;X|     |  \n\t|Nd.                               ,KWNNX:       ;X|     |  \n\t|NNo.                              ,KWNXl        ;X|     |  \n\t|NNNx.                             ,KW0:         ;X|     |\tMade by amayev \u0026\u0026 HgCl2\n\t|NNNN0:.                           ,Od.          ;X|     |  https://alem.school ...\n\t|NNNNNNOc.                        .,'            ;X|     |\n\t|NNNNNNNN0d:.                  .;o0d.            ;X|     |\n\t|NNNNNNNNNNNXOdc;,.......',;cokKNNNOc::::::::::::dX|     |\n\t|NNNNNNNNNNNNNNWNXKK000KKXNNWNNNNNNNNNNNNNNNNNNNNNN|     |\n\n## Collaborators\n---\n amayev - https://github.com/ive663\n\n HgCl2  - https://github.com/HgCl2\n## License\n---\n\nThis project is licensed under the [MIT License](LICENSE).\n```\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR \nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR \nTHE USE OR OTHER DEALINGS IN THE SOFTWARE. \n\nCopyright (c) 2023\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Five663%2Flem-in","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Five663%2Flem-in","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Five663%2Flem-in/lists"}