{"id":20013765,"url":"https://github.com/gregorybchris/typogenetics","last_synced_at":"2025-08-30T04:07:50.813Z","repository":{"id":214555379,"uuid":"736568221","full_name":"gregorybchris/typogenetics","owner":"gregorybchris","description":"From Douglas Hofstadter's \"Gödel, Escher, Bach\" (1979)","archived":false,"fork":false,"pushed_at":"2025-06-14T09:33:13.000Z","size":135,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T10:20:13.546Z","etag":null,"topics":["biology","dna","douglas","genetics","hofstadter","replication","rna","science","strands","typogenetics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorybchris.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":"2023-12-28T08:59:06.000Z","updated_at":"2025-06-14T09:33:16.000Z","dependencies_parsed_at":"2023-12-29T00:26:41.021Z","dependency_job_id":"ae412a9f-ed6b-4673-b33b-79d187f8e191","html_url":"https://github.com/gregorybchris/typogenetics","commit_stats":null,"previous_names":["gregorybchris/typogenetics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregorybchris/typogenetics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Ftypogenetics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Ftypogenetics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Ftypogenetics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Ftypogenetics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorybchris","download_url":"https://codeload.github.com/gregorybchris/typogenetics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Ftypogenetics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272800967,"owners_count":24995185,"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-08-30T02:00:09.474Z","response_time":77,"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":["biology","dna","douglas","genetics","hofstadter","replication","rna","science","strands","typogenetics"],"created_at":"2024-11-13T07:37:47.362Z","updated_at":"2025-08-30T04:07:50.807Z","avatar_url":"https://github.com/gregorybchris.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typogenetics\n\nImplementation of the artificial evolutionary system described in Douglas Hofstadter's \"Gödel, Escher, Bach\".\n\nTypogenetics (or \"typographical genetics\") is a toy model of biological genetics. It boils real biology down to a small set of concepts and rules to make the core principles of genetics more intuitive.\n\n**In biological terms**: Strands of bases are translated into sequences of amino acids. Amino acid sequences are folded into enzymes that can operate on strands by editing them. Applying enzymes to strands produces new strands. Those new strands can in turn be translated into even more amino acid sequences and enzymes. By evolving a population of enzymes we can search for an enzyme (or network of interacting enzymes) that constitutes a very rudimentary form of artificial life.\n\n**In computer terms**: The Typogenetics interpreter executes a program on some input text. The output produced by the interpreter is some text that may itself be another valid program. If the output is a valid program, we can execute it using the same interpreter. If the output is not a valid program, we can still use that output as input text to a valid program. We can run this interpreter in a loop and search for a program that produces itself when given the right input.\n\nFor the nitty gritty of the Typogenetics specification see [spec.md](spec.md)\n\nFor some additional thoughts on ways to extend Typogenetics see [extensions.md](extensions.md)\n\n## Installation\n\nInstall using [uv](https://docs.astral.sh/uv)\n\n```bash\nuv sync\n```\n\n## Usage\n\n```bash\n# Translate a single strand into an enzyme\ntypo translate ATAGAGAGATCACATGTACGATAC\n\n# Apply an enzyme to a strand to produce a set of new strands\ntypo rewrite cop-mvl-mvr-swi-cut-rpy AATACTAAACCGA\n\n# Simulate many generations of evolution with a starting strand\ntypo simulate ATAGCGAATAGGATAATG --iter 10000 --seed 42\n\n# Search for all strands that code for enzymes with similar function\ntypo search ATAAACGATAATTGACAGAGCGAATG ATCGATAGGGAACATGTCGT --edits 5 --depth 20 --seed 42\n```\n\n## Resources\n\n### Repositories\n\n- [andrejjocic/typogenetics](https://github.com/andrejjocic/typogenetics)\n- [kortschak/typo](https://github.com/kortschak/typo)\n- [lpalma/typogenetics](https://github.com/lpalma/typogenetics)\n- [mkpankov/typogenetics](https://github.com/mkpankov/typogenetics)\n- [nzni/typogenetics](https://github.com/nzni/typogenetics)\n- [palm86/typogenetics](https://github.com/palm86/typogenetics)\n- [Quuxplusone/TNT](https://github.com/Quuxplusone/TNT)\n\n### Blogs\n\n- [Gödel, Escher, Bach (David Fifield)](https://www.bamsoftware.com/hacks/geb)\n- [A typogenetics implementation in Elixir (Danie Palm)](https://dev.to/palm86/a-typogenetics-implementation-in-elixir-1jfg)\n\n### Papers\n\n- [Autoreplicators and hypercycles in typogenetics (V. Kvasnicka, J. Pospichal)](https://www.sciencedirect.com/science/article/abs/pii/S016612800100464X)\n- [Typogenetics: a logic of artificial propagating entities (Harold C. Morris)](https://open.library.ubc.ca/media/stream/pdf/831/1.0106810/1)\n- [Typogenetics (Andrew Snare)](https://www.csse.monash.edu.au/hons/projects/1999/Andrew.Snare/thesis.pdf)\n- [Typogenetics: an artificial genetic system (Louis Varetto)](https://pubmed.ncbi.nlm.nih.gov/8474250/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorybchris%2Ftypogenetics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorybchris%2Ftypogenetics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorybchris%2Ftypogenetics/lists"}