{"id":17770120,"url":"https://github.com/j3rn/game-of-evolution","last_synced_at":"2025-03-15T14:30:56.914Z","repository":{"id":152156574,"uuid":"43705678","full_name":"J3RN/game-of-evolution","owner":"J3RN","description":"Game of Evolution","archived":false,"fork":false,"pushed_at":"2023-06-14T21:51:04.000Z","size":135,"stargazers_count":12,"open_issues_count":10,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T03:11:23.607Z","etag":null,"topics":["evolution","game","genetic-algorithm","javascript"],"latest_commit_sha":null,"homepage":"http://j3rn.com/goe","language":"JavaScript","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/J3RN.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":"2015-10-05T18:39:57.000Z","updated_at":"2024-03-04T23:37:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"df075ac7-9216-448a-8482-e06c50796741","html_url":"https://github.com/J3RN/game-of-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/J3RN%2Fgame-of-evolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fgame-of-evolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fgame-of-evolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fgame-of-evolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J3RN","download_url":"https://codeload.github.com/J3RN/game-of-evolution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243742751,"owners_count":20340697,"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":["evolution","game","genetic-algorithm","javascript"],"created_at":"2024-10-26T21:20:41.583Z","updated_at":"2025-03-15T14:30:56.909Z","avatar_url":"https://github.com/J3RN.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Darwin's Game of Evolution\n\nCheck out a live running version [on my website](http:/j3rn.com/goe).\n\n## Running\n- Simply open `index.html` in your browser.\n\n## Controls\n\nThere aren't a lot of \"controls,\" per se, but there are a few interactive features.\n\n- Click to enable the \"inspect\" element. It will jump to your mouse and show you the DNA of the creature that you are currently hovering over. When you move your mouse, the \"inspect\" element will follow.\n- Click \"Reset\" to reset the game to it's beginning state.\n\n## Rules\n\n### Individuals\n\n- Individuals reproduce asexually.\n- When reproducing, the offspring can appear on any of the four spaces around the parent, top, right, bottom, or left.\n- Offspring have a copy of their parent's DNA, with a %1 chance of a random mutation.\n- Individuals who do not eat after 25 turns (2.5 seconds) die of starvation.\n- Individuals have a maximum lifespan (10 seconds).\n- Individuals can eat any other individuals, in accordance with their DNA.\n- Individuals have a size (0 - 5, inclusive). Individuals can only eat other individuals that are smaller than them.\n    - TODO: Hitpoints?\n\n### Game\n\n- The game will end only by one of the following:\n    - All individuals are dead\n    - The \"Reset\" button is pressed\n- The game starts with 5000 individuals\n\n## Development\n\nThe game code is in four files:\n- `js/game.js`\n- `js/creature.js`\n- `js/dna.js`\n- `js/inspect.js`\n\nThere is also `js/canvas_adapter.js`, but it should not need to be modified other than for performance reasons.\n\n### `game.js`\n\n- Should contain all non-creature game logic\n- Creates the board\n- Creates individuals and places them on the board\n- Redraws the game\n- Restarts the game when it is \"over\", as defined above\n\n### `creature.js`\n\n- All creature behavior\n- Creature configuration (lifespan, starvation)\n\n### `dna.js`\n\n- Handles creation of DNA\n- Handles copying of DNA\n\n### `inspect.js`\n\n- Handles the mouse-over action of showing the creature's DNA\n\n## LICENSE\n\nThis is MIT Licensed. You can find the whole license in the `LICENSE` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Fgame-of-evolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj3rn%2Fgame-of-evolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Fgame-of-evolution/lists"}