{"id":24315369,"url":"https://github.com/lablnet/predator-prey-simulation","last_synced_at":"2026-06-10T07:31:06.877Z","repository":{"id":272099619,"uuid":"915530015","full_name":"lablnet/Predator-Prey-Simulation","owner":"lablnet","description":"A web-based interactive simulation of a predator-prey ecosystem built using Three.js. This simulation demonstrates the complex interactions between predators (wolves), prey (rabbits), and grass in a controlled environment.","archived":false,"fork":false,"pushed_at":"2025-01-12T05:08:46.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T22:46:01.026Z","etag":null,"topics":["predator-prey","threejs"],"latest_commit_sha":null,"homepage":"https://predprey.simulations.lablnet.com/","language":"HTML","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/lablnet.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},"funding":{"patreon":"lablnet"}},"created_at":"2025-01-12T04:51:32.000Z","updated_at":"2025-01-12T05:09:24.000Z","dependencies_parsed_at":"2025-01-12T05:26:02.183Z","dependency_job_id":"d49f2b77-53e5-484d-aaa6-f50427ee34b4","html_url":"https://github.com/lablnet/Predator-Prey-Simulation","commit_stats":null,"previous_names":["lablnet/predator-prey-simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPredator-Prey-Simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPredator-Prey-Simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPredator-Prey-Simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPredator-Prey-Simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lablnet","download_url":"https://codeload.github.com/lablnet/Predator-Prey-Simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242762744,"owners_count":20181266,"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":["predator-prey","threejs"],"created_at":"2025-01-17T11:15:11.407Z","updated_at":"2026-06-10T07:31:06.827Z","avatar_url":"https://github.com/lablnet.png","language":"HTML","funding_links":["https://patreon.com/lablnet"],"categories":[],"sub_categories":[],"readme":"# Predator-Prey Simulation with Grass\n\nA web-based interactive simulation of a predator-prey ecosystem built using Three.js. This simulation demonstrates the complex interactions between predators (wolves), prey (rabbits), and grass in a controlled environment.\n\n## Features\n\n- **3D Environment**: Beautiful 3D visualization with dynamic lighting and shadows\n- **Interactive UI**: Adjustable simulation parameters through an intuitive user interface\n- **Mobile Responsive**: Fully responsive design that works on both desktop and mobile devices\n- **Real-time Statistics**: Track simulation metrics and view detailed statistics\n- **Dynamic Ecosystem**: Complex interactions between three trophic levels:\n  - Predators (Wolves)\n  - Prey (Rabbits)\n  - Grass (Vegetation)\n\n## Simulation Rules\n\n### Predators (Wolves)\n- Hunt and consume prey to survive\n- Die if they don't eat within their lifespan\n- Reproduce after consuming prey\n- Show visual indicators of hunger\n- Slow down when hungry\n- Create two offspring upon successful reproduction\n\n### Prey (Rabbits)\n- Consume grass to survive\n- Escape from nearby predators\n- Die if they don't eat within their lifespan\n- Reproduce after eating sufficient grass\n- Show visual indicators of hunger\n- Get speed boost when escaping predators\n\n### Grass\n- Regrows periodically\n- Limited to maximum density\n- Serves as food source for prey\n- Strategically placed across the environment\n\n## Controls \u0026 Parameters\n\nThe simulation offers several adjustable parameters:\n\n- **Number of Prey**: Initial rabbit population (1-100)\n- **Number of Predators**: Initial wolf population (1-50)\n- **Predator Lifespan**: Maximum survival time without food (5-60 seconds)\n- **Predator Hunger Warning**: Time before hunger effects begin (3-30 seconds)\n- **Prey Lifespan**: Maximum survival time without food (5-60 seconds)\n- **Prey Hunger Warning**: Time before hunger effects begin (3-30 seconds)\n\n## Technical Details\n\n### Technologies Used\n- **Three.js**: For 3D rendering and animations\n- **HTML5/CSS3**: For UI and responsive design\n- **JavaScript**: For simulation logic and ecosystem behavior\n\n### Performance Optimizations\n- Mobile-specific optimizations\n- Frame rate management\n- Efficient collision detection\n- Memory management through object pooling\n- Adaptive rendering quality\n\n## Getting Started\n\n1. Clone the repository\n2. Open `index.html` in a modern web browser\n3. Click \"Start Simulation\" to begin\n4. Use the UI panel to adjust parameters\n5. Click \"Update\" to apply changes\n\n## Browser Compatibility\n\nThe simulation works best in modern browsers that support WebGL:\n- Chrome (recommended)\n- Firefox\n- Safari\n- Edge\n\n## Mobile Support\n\nThe simulation is optimized for mobile devices with:\n- Touch-friendly controls\n- Responsive UI\n- Performance optimizations\n- Adaptive quality settings\n\n## Statistics Tracking\n\nThe simulation tracks various metrics:\n- Simulation duration\n- Maximum predator population\n- Maximum prey population\n- Total grass consumed\n- Total prey eaten\n\n## Contributing\n\nFeel free to contribute to this project by:\n1. Forking the repository\n2. Creating a feature branch\n3. Committing your changes\n4. Opening a pull request\n\n## License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fpredator-prey-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flablnet%2Fpredator-prey-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fpredator-prey-simulation/lists"}