{"id":13713410,"url":"https://github.com/csixteen/simulated-evolution","last_synced_at":"2025-05-06T23:32:02.566Z","repository":{"id":151894853,"uuid":"295229769","full_name":"csixteen/simulated-evolution","owner":"csixteen","description":":herb: Simulated Evolution, adapted from A.K. Dewdney's article in the \"Computer Recreations\" column of Scientific American (May 1989: 138-141).","archived":true,"fork":false,"pushed_at":"2020-09-14T08:23:03.000Z","size":277,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-13T00:37:27.249Z","etag":null,"topics":["2d-game","evolution","go","golang","simulation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/csixteen.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":"2020-09-13T20:14:03.000Z","updated_at":"2024-05-13T00:37:27.945Z","dependencies_parsed_at":"2023-05-14T23:00:21.582Z","dependency_job_id":null,"html_url":"https://github.com/csixteen/simulated-evolution","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/csixteen%2Fsimulated-evolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csixteen%2Fsimulated-evolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csixteen%2Fsimulated-evolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csixteen%2Fsimulated-evolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csixteen","download_url":"https://codeload.github.com/csixteen/simulated-evolution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224546998,"owners_count":17329413,"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":["2d-game","evolution","go","golang","simulation"],"created_at":"2024-08-02T23:01:35.426Z","updated_at":"2024-11-14T00:30:32.894Z","avatar_url":"https://github.com/csixteen.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# Simulated Evolution\n\nAdapted from A.K. Dewdney's article \"Simulated evolution: wherein bugs learn to hunt bacteria\" in the \"Computer Recreations\" column of Scientific American (May 1989: 138-141). I gave it a little twist and replaced bugs and bacteria with animals and trees. The motion of the animals is still a bit random, not exactly taking the genes into consideration. My objective was mostly to play with [Pixel](github.com/faiface/pixel), a 2D game library.\n\nThe code is still a tiny tad messy and lacking documentation, but hopefully it's easy to understand and modify.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/csixteen/simulated-evolution/master/screenshots/simulated-evolution.png\" /\u003e\n\u003c/p\u003e\n\n*Disclaimer: I didn't create these sprites, I found them on the [webz](https://i.imgur.com/ij2dbGa.png). I wish I knew who created to give proper credit.*\n\n# Dependencies\n\nThe project uses Go modules, so you'll want to use a version of Go more recent than [1.11](https://blog.golang.org/using-go-modules).\n\n# Building\n\n```\n$ make bin\ngo build -o evolution cmd/simulated-evolution/*.go\n```\n\n# The world\n\nWhen you launch the program, an animal will be spawned at the center of the world. Each animal has 8 genes and a certain amount of energy. Some of the genes will determine their predisposition for agressiveness. When they reproduce (actually this is pretty basic, they essentially clone themselves), there is a gene mutation on the offspring.\n\nThere are 6 types of trees in the world, and when eaten they either give or take energy, depending on the type of tree.\n\n# Controls\n\n- Up, Down, Left, Right =\u003e controls the camera motion.\n- Mouse / TouchPad scroll up/down =\u003e Camera zoom in and out\n\n# Limitations and Caveats\n\n- All the values are still hardcoded: chance of reproduction, necessary energy for reproduction, probability of trees growing, etc.\n- Path for sprites are hardcoded.\n- Animal motion is still random, perhaps it should depend not only on the genes but on the outcome of exploring certain areas and their interaction with other animals.\n- The code isn't tested at all\n\n# Contributing\n\nI'll be tackling the limitations and caveats as I find the time, but contributions are more than welcome. Just open a Pull-request. Don't forget to check the [Issues](https://github.com/csixteen/simulated-evolution/issues) section.\n\n# License\n\n[MIT](https://github.com/csixteen/simulated-evolution/blob/master/LICENSE), as always.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsixteen%2Fsimulated-evolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsixteen%2Fsimulated-evolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsixteen%2Fsimulated-evolution/lists"}