{"id":28305936,"url":"https://github.com/adrianklessa/superpermutations","last_synced_at":"2026-04-24T12:32:40.606Z","repository":{"id":283514827,"uuid":"909421633","full_name":"AdrianKlessa/superpermutations","owner":"AdrianKlessa","description":"Experiments with reinforcement learning to find short superpermutations","archived":false,"fork":false,"pushed_at":"2025-06-18T19:10:11.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T20:19:22.004Z","etag":null,"topics":["gymnasium-environment","reinforcement-learning","stable-baselines3","superpermutation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/AdrianKlessa.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,"zenodo":null}},"created_at":"2024-12-28T16:50:14.000Z","updated_at":"2025-06-18T19:10:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a6cba29-82a0-489a-aa24-d8792d6fcdae","html_url":"https://github.com/AdrianKlessa/superpermutations","commit_stats":null,"previous_names":["adrianklessa/superpermutations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AdrianKlessa/superpermutations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianKlessa%2Fsuperpermutations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianKlessa%2Fsuperpermutations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianKlessa%2Fsuperpermutations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianKlessa%2Fsuperpermutations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdrianKlessa","download_url":"https://codeload.github.com/AdrianKlessa/superpermutations/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianKlessa%2Fsuperpermutations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32223941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["gymnasium-environment","reinforcement-learning","stable-baselines3","superpermutation"],"created_at":"2025-05-24T03:13:28.006Z","updated_at":"2026-04-24T12:32:40.593Z","avatar_url":"https://github.com/AdrianKlessa.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Superpermutations\n\nA Gymnasium environment and code examples for experiments with looking for short superpermutations using reinforcement learning\n\n### Tools used:\n\n* Gymnasium API was used to create a reinforcement learning environment compatible with other libraries\n* Stable Baselines3 was used to train RL agents on the aforementioned environment\n* MLFlow is used to keep track of experiments\n\n### Included files:\n\n* `permutation_utils` contains functions to get all possible permutations of an alphabet, checking how much two permutations overlap, checking if a string is a valid superpermutation etc.\n* `permutation_env` contains a custom class that contains all necessary information and methods for building a superpermutation step-by-step by appending (with overlaps) new permutations\n* `GymPermutationEnv` is a wrapper over `permutation_env` providing support for the Gymnasium API used by Stable Baselines3\n* `superpermutations for n4` is a Jupyter notebook with a POC for generating the shortest superpermutation for n=4\n* `superpermutations for n5` contains observations from an analogous attempt for an alphabet with 5 characters\n\n### Observation / action format\n\nGiven an alphabet with `n` distinct characters each of the `n!` permutations is assigned an ID. \n\nThen, an observation is composed of two concatenated 1D arrays of length `n!` - the first has 1s only at the indices corresponding to previously added (either through direct addition or by an overlap between a previous and new permutation) permutations, the second has a single `1` entry at the index of the **last** added permutation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianklessa%2Fsuperpermutations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianklessa%2Fsuperpermutations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianklessa%2Fsuperpermutations/lists"}