{"id":13733829,"url":"https://github.com/bones-ai/rust-escape-ai","last_synced_at":"2025-04-10T00:23:32.761Z","repository":{"id":165227462,"uuid":"639918898","full_name":"bones-ai/rust-escape-ai","owner":"bones-ai","description":"AI plays a small escape room game, written in rust","archived":false,"fork":false,"pushed_at":"2023-05-14T14:19:48.000Z","size":45,"stargazers_count":45,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T02:06:58.811Z","etag":null,"topics":["artificial-intelligence","escape-room","genetic-algorithm","macroquad","rustlang"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=OeojCLDKaJU","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bones-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-12T14:21:52.000Z","updated_at":"2025-02-27T08:08:03.000Z","dependencies_parsed_at":"2023-05-19T22:45:29.529Z","dependency_job_id":null,"html_url":"https://github.com/bones-ai/rust-escape-ai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bones-ai%2Frust-escape-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bones-ai%2Frust-escape-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bones-ai%2Frust-escape-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bones-ai%2Frust-escape-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bones-ai","download_url":"https://codeload.github.com/bones-ai/rust-escape-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248132385,"owners_count":21053028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["artificial-intelligence","escape-room","genetic-algorithm","macroquad","rustlang"],"created_at":"2024-08-03T03:00:49.697Z","updated_at":"2025-04-10T00:23:32.735Z","avatar_url":"https://github.com/bones-ai.png","language":"Rust","funding_links":[],"categories":["Apps or visualizations"],"sub_categories":["Apps or visualizations: On top of macroquad"],"readme":"## Escape AI\nAI learns escape a room. \n\nThis is a [rust](https://www.rust-lang.org/) based implementation of a genetic algorithm and reinforcement learning simulation that trains an AI named Zoe to escape from five rooms of increasing difficulty. The simulation is built using the [macroquad](https://macroquad.rs/) library.\n\n## Demo\n[![youtube](https://img.youtube.com/vi/OeojCLDKaJU/0.jpg)](https://www.youtube.com/watch?v=OeojCLDKaJU)\n\n## Usage\n- Clone the repo\n    ```\n    git clone git@github.com:bones-ai/rust-escape-ai.git\n    cd rust-escape-ai\n    ```\n- Run the simulation\n    ``` \n    cargo run --release\n    ```\n- To update the simulation configurations use the configs file located at `src/configs.rs`\n\n## Create custom rooms\n- [Tiled map editor](https://www.mapeditor.org/) is used for building the 2d levels\n- To create custom levels and play around with the AI, use tile layers with names `player`, `keys`, `door`, `walls`, `spikes`, `enemies` and `background`. I suggest taking a look at how other maps are built to understand how things are to be setup.\n\n## Configurations\n- The project config file is located at `src/configs.rs`\n- The game rooms have to be manually configured in the config file.\n\n## Inputs\n- `Spacebar` - Pause/Unpause the simulation\n- `Tab` - Show/hide the egui control menu\n- `r` - Restart the simulation\n- `Backspace` - Slow mode\n- `Backslash` - Enable AI, start the AI training process (Use this to play the game yourself, using keyboard inputs wasd)\n- `Right Shift` - Run at 5x speed\n- `Mouse wheel` - Zoom in/out\n- `Mouse wheel with ctrl` - Large zoom in/out\n- `Right mouse click drag` - Pan through the world\n- To draw all training AI agents, use the egui menu, then select `Show Multi`. Caution, if you have too many game rooms being simulation, this could freeze your machine.\n\n## Assets\n- [https://fisherg.itch.io/micro-asset-pack](https://fisherg.itch.io/micro-asset-pack)\n\n## If Zoe isn't able to solve a room\n- Try restarting (using shortcut `r`). It's impossible to get the same results as in the youtube video as every simulation run is random. Sometimes Zoe might get stuck (or spend a lot of time/steps) in a region, letting the simulation run for a longer is an option (but it'll take a long time).\n- Update `NUM_FRAMES` to a larger value. Once the room is solved, Zoe will try to solve the room more efficiently (i.e taking less steps)\n- Run the simulation at 5x (by using shortcut `Right Shift`). Some rooms can take a lot of generations to solve.\n- Disable the drawings in the egui menu to speed up the training process\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbones-ai%2Frust-escape-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbones-ai%2Frust-escape-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbones-ai%2Frust-escape-ai/lists"}