{"id":15047375,"url":"https://github.com/erthium/boids","last_synced_at":"2026-02-11T00:01:59.096Z","repository":{"id":231791493,"uuid":"782725331","full_name":"erthium/boids","owner":"erthium","description":"Simulation of Boid artificial life program","archived":false,"fork":false,"pushed_at":"2025-12-25T00:54:29.000Z","size":5736,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T13:42:35.614Z","etag":null,"topics":["agent-based-simulation","boids","boids-behaviour","boids-simulation","cpp","cpp11","flocking","flocking-agents","flocking-simulation","functional-programming","makefile","sdl","sdl2","sdl2-image","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erthium.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,"zenodo":null}},"created_at":"2024-04-05T22:22:06.000Z","updated_at":"2025-12-25T00:54:33.000Z","dependencies_parsed_at":"2024-04-24T01:55:19.477Z","dependency_job_id":"0be1bfcc-ab64-4066-8593-0a2e3d9d4edd","html_url":"https://github.com/erthium/boids","commit_stats":null,"previous_names":["ertyumpx/boids","erthium/boids"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erthium/boids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fboids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fboids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fboids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fboids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erthium","download_url":"https://codeload.github.com/erthium/boids/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fboids/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29322733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agent-based-simulation","boids","boids-behaviour","boids-simulation","cpp","cpp11","flocking","flocking-agents","flocking-simulation","functional-programming","makefile","sdl","sdl2","sdl2-image","simulation"],"created_at":"2024-09-24T20:57:18.824Z","updated_at":"2026-02-11T00:01:59.066Z","avatar_url":"https://github.com/erthium.png","language":"C++","readme":"# Boids\n\nSimple simulation of **Boid** artificial life program initially developed by Craig Reynolds in 1986.\n\n---\n\n\u003cp align=\"left\"\u003e\n  \u003cimg width=\"600\" height=\"330\" src=\"https://raw.githubusercontent.com/ErtyumPX/boids/main/assets/images/general.gif\"\u003e\n\u003c/p\u003e\n\n---\n\nThe main source that I followed while developing the simulation is [Boids - Cornell ECE](https://people.ece.cornell.edu/land/courses/ece4760/labs/s2021/Boids/Boids.html), I appreciate the detailed explanation and the code provided.\n\n## License\n\nThis project is licensed under the [GNU GPL-3.0](https://github.com/ErtyumPX/boids/blob/main/LICENSE) license.\n\nFeel free to use the source code. Referring to the repository would be very much appreciated.\n\n## Setup\n\nProject is currently compiled with `GNU G++ 13.2.1`.\n\nThe only third-party dependency is `SDL2`. Used version of SDL2 in project is `2.28.5`, should work as long as it is **SDL2** and not **SDL**.\n\nFor compiling and linking rules `GNU Make 4.4.1` was used. After downloading dependencies, make sure to change the include paths inside the Makefile.\n\n```\n# change the paths for '-I' \nCC := g++\nCFLAGS := -Wall -std=c++11 -I/usr/include/SDL2           # here\nTEST_CFLAGS := -Wall -std=c++11 -Iinclude/SDL2 -Isrc/    # and here\nLDFLAGS := -lSDL2 -lSDL2_image\n...\n```\n\nAfter fulfilling dependencies, download or clone the project and use Makefile to easily compile:\n\n```\n\u003e make all\n\u003e make run\n```\n\nSince SDL2 is a cross-platform media library, output should work on Windows, MacOS and Linux.\n\n## Rules\n\nAs with most artificial life simulations, Boids is an example of emergent behavior; that is, the complexity of Boids arises from the interaction of individual agents (the boids, in this case) adhering to a set of simple rules. The rules applied in the simplest Boids world are as follows:\n\n- **Separation**: steer to avoid crowding local flockmates\n- **Alignment**: steer towards the average heading of local flockmates\n- **Cohesion**: steer to move towards the average position (center of mass) of local flockmates\n\nSource: [Wikipedia Boids](https://en.wikipedia.org/wiki/Boids)\n\n## Simulation\n\nThe simulation allows you to:\n- Speed up/down the simulation using `q` and `e` keys\n- Toggle the debug mode for seeing each agents' visual and protected range using `d` key\n- Restart the simulation using `r` key\n\n**Speeding Up/Down**\n\n\u003cp align=\"left\"\u003e\n  \u003cimg width=\"600\" height=\"330\" src=\"https://raw.githubusercontent.com/ErtyumPX/boids/main/assets/images/speed_up_down.gif\"\u003e\n\u003c/p\u003e\n\n\n**Debug Mode**\n\n\u003cp align=\"left\"\u003e\n  \u003cimg width=\"600\" height=\"330\" src=\"https://raw.githubusercontent.com/ErtyumPX/boids/main/assets/images/debug_mode.gif\"\u003e\n\u003c/p\u003e\n\n## General Structure\n\n### Directory Structure and Files\n\n- `src/` directory contains the source code\n  - `src/main.cpp` is the entry point of the program\n  - `src/game.hpp` contains the declarations of the core functions\n  - `src/game.cpp` contains the implementation of core functions\n  - `src/agent.hpp` has the struct of the boid agents\n  - `src/master.cpp` has the struct of all the configurations for the simulation\n- `stable/` directory contains the stable output\n  - `stable/boids.follow` is the executable\n\n### How It Goes\n\nWill be updated soon.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferthium%2Fboids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferthium%2Fboids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferthium%2Fboids/lists"}