{"id":15648149,"url":"https://github.com/noracodes/evolve-sbrain","last_synced_at":"2025-07-29T16:40:32.958Z","repository":{"id":84925695,"uuid":"90075529","full_name":"NoraCodes/evolve-sbrain","owner":"NoraCodes","description":"Parallel evolutionary programming using Semantic Brain","archived":false,"fork":false,"pushed_at":"2018-04-09T19:44:23.000Z","size":29,"stargazers_count":31,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T14:13:14.630Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoraCodes.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":"2017-05-02T20:34:29.000Z","updated_at":"2024-11-02T02:24:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b95f0c38-8067-455d-af8c-e8b6e41440dd","html_url":"https://github.com/NoraCodes/evolve-sbrain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NoraCodes/evolve-sbrain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoraCodes%2Fevolve-sbrain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoraCodes%2Fevolve-sbrain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoraCodes%2Fevolve-sbrain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoraCodes%2Fevolve-sbrain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoraCodes","download_url":"https://codeload.github.com/NoraCodes/evolve-sbrain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoraCodes%2Fevolve-sbrain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267718502,"owners_count":24133458,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-03T12:23:45.015Z","updated_at":"2025-07-29T16:40:32.882Z","avatar_url":"https://github.com/NoraCodes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# evolve-sbrain\n\nThis program uses a simple, highly parallel evolutionary algorithm to evolve computer programs in my language [sbrain](https://github.com/silverwingedseraph/sbrain).\n\nIf you're looking to run the generated programs, take a look at [sbic](https://github.com/silverwingedseraph/sbic).\n\nIt is quite effective at evolving relatively simple algorithms. It is invoked with `cargo run --release \u003cconfig file\u003e`, where the config file looks like this:\n\n```\nmutations_per_generation = 3\ninitial_program_length = 8\nmax_runtime = 128\npopulation_size = 32\ninputs = [ [1],       [2],       [999]]\ntargets = [[1, 2, 3], [2, 3, 4], [999, 1000, 1001]]\n```\n\nThis is the specification for a program that starts at the input, and prints the next two consecutive numbers.\nA sample run from this example is:\n\n```\nGeneration     1 Cost  5079: .Sa.s-^a\nGeneration     2 Cost  2013: ..S,.s-^a\nGeneration    26 Cost  1011: ,..zS,.s-^a\nGeneration    30 Cost     6: ,..zS+.s-^a\nGeneration    53 Cost     3: ,..+S+.s-^a\nGeneration   101 Cost     0: ,.*+.+.s-^a\nProgram found after 101 tries.\n,.*+.+.s-^a\nRan for 100 cycles and did not halt\n[1] -\u003e ,.*+.+.s-^a -\u003e [1, 2, 3]\nRan for 100 cycles and did not halt\n[2] -\u003e ,.*+.+.s-^a -\u003e [2, 3, 4]\nRan for 100 cycles and did not halt\n[999] -\u003e ,.*+.+.s-^a -\u003e [999, 1000, 1001]\n```\n\nThe optimal program, of course, is `,.+.+.`. \n\nThere are a number of sample configurations in `sample-configs/`. Try them out! \nNote also that the option `legacy = true` can be added to the config file to force the algorithm to use only the\noriginal 8 Brainf*** instructions. For instance:\n\n```\nGeneration     1 Cost  2013: +,.,.--,,.\nGeneration     3 Cost  1011: ]+\u003e,[.[.[\u003e.\nGeneration     7 Cost    12: \u003c\u003c,+.++..\nGeneration     8 Cost     6: \u003e,..+.\nGeneration     9 Cost     3: \u003c\u003c-,.++..\nGeneration  1675 Cost     0: \u003c-\u003c---+,.+.+.\nProgram found after 1675 tries.\n\u003c-\u003c---+,.+.+.\nRan for 128 cycles and did not halt\n[1] -\u003e \u003c-\u003c---+,.+.+. -\u003e [1, 2, 3]\nRan for 128 cycles and did not halt\n[2] -\u003e \u003c-\u003c---+,.+.+. -\u003e [2, 3, 4]\nRan for 128 cycles and did not halt\n[999] -\u003e \u003c-\u003c---+,.+.+. -\u003e [999, 1000, 1001]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoracodes%2Fevolve-sbrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoracodes%2Fevolve-sbrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoracodes%2Fevolve-sbrain/lists"}