{"id":23927151,"url":"https://github.com/sergeychelak/synacor_challenge","last_synced_at":"2026-05-30T16:31:31.875Z","repository":{"id":62883476,"uuid":"561048241","full_name":"SergeyChelak/synacor_challenge","owner":"SergeyChelak","description":"Completed Synacor Challenge","archived":false,"fork":false,"pushed_at":"2022-11-13T16:23:56.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T22:14:34.088Z","etag":null,"topics":["backtracking","backtracking-algorithm","backtracking-search","challenge","memoization","permutation-algorithms","permutations","rust","synacor-challenge","virtual-machine"],"latest_commit_sha":null,"homepage":"","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/SergeyChelak.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}},"created_at":"2022-11-02T20:39:52.000Z","updated_at":"2022-11-13T16:25:40.000Z","dependencies_parsed_at":"2022-11-08T12:00:16.131Z","dependency_job_id":null,"html_url":"https://github.com/SergeyChelak/synacor_challenge","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/SergeyChelak%2Fsynacor_challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergeyChelak%2Fsynacor_challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergeyChelak%2Fsynacor_challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergeyChelak%2Fsynacor_challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergeyChelak","download_url":"https://codeload.github.com/SergeyChelak/synacor_challenge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240400334,"owners_count":19795332,"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":["backtracking","backtracking-algorithm","backtracking-search","challenge","memoization","permutation-algorithms","permutations","rust","synacor-challenge","virtual-machine"],"created_at":"2025-01-05T22:14:38.167Z","updated_at":"2026-05-30T16:31:31.867Z","avatar_url":"https://github.com/SergeyChelak.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Synacor Challenge](https://challenge.synacor.com)\nThis project is a usual CLI application written in Rust. It also contains additional folders:\n- **data** contains the executable binary for Virtual Machine and script with the full list of commands to complete the challenge\n- **playground** contains tiny CLI apps that were written during solving quest's tasks\n\n## Virtual Machine\n\nThe whole challenge is messing around with a virtual machine. In the very beginning, you should implement 22 instructions according to the architecture specifications. That's not sound like a pretty complex task but it requires a accuracy in this routine.\u003cbr/\u003e\nOnce the virtual machine is completed, you may start it and play the text-based adventure game. Hello from 80th)\u003cbr/\u003e\n\n## The Adventure Game\nMake sure that Cargo and Rust are installed. Then execute in your command line\n```\ncargo run -- data/challenge.bin\n```\n\n## Coins\nThe bruteforce solution to order the coins is [here](https://github.com/SergeyChelak/virtual_machine/blob/master/playground/coins/main.rs)\n\n## Teleporter\nI needed to write a disassembly and execution dump for the virtual machine to obtain the entry point, conditions to activate the handheld teleporter, and bypass its confirmation mechanism. There is a separate [branch](https://github.com/SergeyChelak/virtual_machine/tree/disassembly) for that purpose. The result is looks something like this:\n```\n5483          set [r0] 4\n5486          set [r1] 1\n5489         call @6027\n6027           jt [r0] @6035\n6030          add [r0] [r1]  1\n6034          ret\n6035           jt [r1] @6048\n6038          add [r0] [r0]  32767\n6042          set [r1] [r7]\n6045         call @6027\n6047          ret\n6048         push [r0]\n6050          add [r1] [r1]  32767\n6054         call @6027           \n6056          set [r1] [r0]       \n6059          pop [r0]\n6061          add [r0] [r0]  32767\n6065         call @6027           \n6067          ret\n```\nThe search for valid value for the 8th register is [here](https://github.com/SergeyChelak/virtual_machine/blob/master/playground/confirmation/main.rs). The virtual machine patches the program before execution to pass the confirmation mechanism and, of course, to obtain the valid next challenge code.\u003cbr/\u003e\nActually, this is an [Ackermann function](https://en.wikipedia.org/wiki/Ackermann_function)\n\n## Vault\nYou need to change the orb's weight from 22 to 30 by moving among the rooms. The path should be the shortest. The backtracking search for this task is [here](https://github.com/SergeyChelak/virtual_machine/blob/master/playground/vault/main.rs). It isn't a brilliant implementation but good enough to pass this task and complete the challenge.\n\n## Whole challenge\nThis is a great spoiler on how to pass the challenge and obtain all codes (except the first one):\n```\ncargo run -- data/challenge.bin data/script.txt\n```\nEnjoy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeychelak%2Fsynacor_challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeychelak%2Fsynacor_challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeychelak%2Fsynacor_challenge/lists"}