{"id":26402947,"url":"https://github.com/emik03/museum-brute-force","last_synced_at":"2025-03-17T15:29:25.763Z","repository":{"id":281200454,"uuid":"944421267","full_name":"Emik03/museum-brute-force","owner":"Emik03","description":"Brute force solver for the Proditum's reoccuring puzzle.","archived":false,"fork":false,"pushed_at":"2025-03-07T16:11:02.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T17:12:37.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Emik03.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T10:12:22.000Z","updated_at":"2025-03-07T16:11:06.000Z","dependencies_parsed_at":"2025-03-07T15:34:45.612Z","dependency_job_id":null,"html_url":"https://github.com/Emik03/museum-brute-force","commit_stats":null,"previous_names":["emik03/museum-brute-force"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emik03%2Fmuseum-brute-force","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emik03%2Fmuseum-brute-force/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emik03%2Fmuseum-brute-force/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emik03%2Fmuseum-brute-force/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emik03","download_url":"https://codeload.github.com/Emik03/museum-brute-force/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244057830,"owners_count":20390983,"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":[],"created_at":"2025-03-17T15:29:25.145Z","updated_at":"2025-03-17T15:29:25.754Z","avatar_url":"https://github.com/Emik03.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# museum-brute-force\n\nBrute force solver for the Online Reality Game Proditum's reoccuring puzzle.\nThe name ended up becoming a bit of a misnomer, since it was made for the Museum's last puzzle, but later got reused throughout each escape room.\nStandard output will only contain the answer, and standard error will indicate progress updates.\n\n---\n\n- [Usage](#usage)\n- [Building](#building)\n- [Refactor](#refactor)\n- [License](#license)\n\n---\n\n## Usage\n\n- The main program is to brute force the best possible answer, you are intended to edit the `puzzle.txt`.\n  - The first line represents all the initial amount of BP/Gold that each user has, comma-separated. This must be **EXACTLY** 9 elements long to compile successfully.\n  - The second line represents the target. If less than 9 elements are specified, the users to the rightmost are tested for maximization.\n- Tests exist to validate an answer, you are intended to additionally edit the `vaults` declaration and assertion.\n\nWhile editing source is inconvenient, this program is specifically designed for performance first, ease-of-use second.\nThis program runs best if you run on a CPU with 32 cores, such as the code author's `AMD Ryzen 9 7950X`. If you don't have one, it should still run reasonably fast.\nThat being said, the program is designed to use 27 cores to divide the task quickly and evenly. Not all cores are used since many applications tend to be single-threaded, so this is a considered a best compromise.\n\n## Building\n\nAs with any rust project, you simply run with `cargo run --release`, no special dependencies.\nBe sure to compile the program in release mode, as without optimizations, this program is comparable to the old C# implementation.\n```sh\ncargo run --release\n```\n\nYou may also compile the program in `VERBOSE` mode which logs every time a thread finds a new best answer for its specific task.\nThe environment variable is checked at compile-time, not at runtime, hence the command:\n```sh\nVERBOSE=1 cargo run --release\n```\n\nBear in mind, for huge computations the program will not output anything for a while, as the array is cycled from the right.\nThis means that it assumes that users to the left that have some target will all submit 0, while the users to the right permute.\n\n## Refactor\n\nThis repository is a refactor of my original implementation written in C#, also available in the repository as a [`.csx` file](src/OldImplementation.csx).\nThe old implementation worked for the first time, but was too slow, only computing 300 thousand simulations per second.\nThe new implementation which was required when this puzzle was reused computes over 1 billion simulations per second.\nTo run the old implementation, use [`dotnet-script`](https://github.com/dotnet-script/dotnet-script) or [`CSharpRepl`](https://github.com/waf/CSharpRepl) on it, or any other C# scripting language.\nAlternatively, replace the `#r` import with the returned contents from the URL and run it as a non-scripted C# program.\n\n## License\n\nThis repository falls under the [Unlicense](https://unlicense.org). Do whatever you want with the code. No credit ever required, but it would still be appreciated.\n\nBare in mind, while the [`.csx` file](src/OldImplementation.csx) itself still falls under the license, the [`Emik.Morsels`](https://github.com/Emik03/Emik.Morsels) source code it imports **still falls under its license**, and is **\u003cins\u003enot\u003c/ins\u003e overriden by this license**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femik03%2Fmuseum-brute-force","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femik03%2Fmuseum-brute-force","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femik03%2Fmuseum-brute-force/lists"}