{"id":26397245,"url":"https://github.com/aramshiva/boids","last_synced_at":"2026-05-20T06:06:34.816Z","repository":{"id":273292404,"uuid":"919230545","full_name":"aramshiva/boids","owner":"aramshiva","description":"🦅 Artifical Swarm Intelligence","archived":false,"fork":false,"pushed_at":"2025-01-30T01:19:58.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T20:54:26.608Z","etag":null,"topics":["art","boids","generative","math","numpy","pygame","python","swarm"],"latest_commit_sha":null,"homepage":"https://boids.aram.sh","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aramshiva.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":"2025-01-20T02:16:16.000Z","updated_at":"2025-01-30T01:20:02.000Z","dependencies_parsed_at":"2025-01-27T18:56:11.024Z","dependency_job_id":"d10a1009-07f8-4c24-a460-39ca64a4c502","html_url":"https://github.com/aramshiva/boids","commit_stats":null,"previous_names":["aramshiva/boid","aramshiva/boids"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aramshiva%2Fboids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aramshiva%2Fboids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aramshiva%2Fboids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aramshiva%2Fboids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aramshiva","download_url":"https://codeload.github.com/aramshiva/boids/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031152,"owners_count":20386534,"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":["art","boids","generative","math","numpy","pygame","python","swarm"],"created_at":"2025-03-17T12:16:53.718Z","updated_at":"2026-05-20T06:06:34.811Z","avatar_url":"https://github.com/aramshiva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![ScreenShot 2025-01-20 at 17 26 22@2x](https://github.com/user-attachments/assets/3573a122-e996-4762-95b3-fc6d6a62ec27)\n\n# Boids!\nBoids is an artificial life program, developed by [Craig Reynolds](https://www.red3d.com/cwr/) in 1986, which simulates the flocking behaviour of birds, and related group motion.\n\nBoids uses three simple rules to work accurately:\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\n### TL;DR Boids is a program that can create really cool swarm intelligences and can simulate basically real flocks of birds, schools of fish and stuff like that.\n\n## Technology\n- The language is python, ¯\\_(ツ)_/¯\n- The visual/graphics run on [`pygame`](https://pygame.org) (An python library to make 2D graphics.python) to run the visuals. \n- [`numpy`](https://numpy.org/) is used to run more complex mathmatical calculations to caclulate boids three rules.\n\n## Run it Yourself!\nThat's cool and all but how do I run it myself?\n\u003e [!WARNING]\n\u003e This code uses a lot (~1GB) of RAM and threads. This is due to how the optimization techniques work and I do not guarantee it will work on your local machine, if it doesn't post a GitHub issue but I can't promise anything\n- Make sure you have [Python](https://www.python.org/) installed.\n- Next, clone the repo and move to that directory.\n- Run: \n```\npip install -r requirements.txt\n```\n- Last, run `python3 main.py`!\n\n### Controls\n- `R` - Add boids\n- `CLICK` - Add boid\n- `-` - Remove boids\n- `B` - Change boid mode (different filters and styles!)\n- `C` - Change color of boids\n- `G` - Change boid vision type\n- `V` - Show boid vision\n\n### Change stats\nWell, the code is open-source! So you can play around with it, if you want a low-code solution check out the ALL CAPS variables at the top of `main.py` to edit them, the names are pretty self explanatory. Here are the defaults:\n```\nCOLORS = {\"BLUE\": (12, 18, 226),\"RED\": (255, 0, 0),\"GREEN\": (0, 255, 0),\"YELLOW\": (255, 255, 0),\"ORANGE\": (255, 165, 0),\"PURPLE\": (128, 0, 128),\"PINK\": (255, 192, 203),\"CYAN\": (0, 255, 255),\"WHITE\": (255, 255, 255),\"BLACK\": (0, 0, 0),\"GRAY\": (128, 128, 128),\"BROWN\": (165, 42, 42), \"GRAY\": (128, 128, 128)}\nHEIGHT = 750\nWIDTH = 1250\nBG_COLOR = (255, 255, 255)\nVISION_COLOR = (200, 200, 200)\nSHOW_VISION = False\nBOID_SIZE = 5\nBOID_TYPE = \"lights\"\nVISION_RADIUS = 20\nBOIDS_COUNT = 1000\nTRANSPARENCY_VALUE = 5\nBOID_COLOR = COLORS[\"RED\"]\n```\nTo change a color use an RGB format, some preset colors can be pasted in:\n- `COLORS[\"BLUE\"]`\n- `COLORS[\"RED\"]`\n- `COLORS[\"GREEN\"]`\n- `COLORS[\"YELLOW\"]`\n- `COLORS[\"ORANGE\"]`\n- `COLORS[\"PURPLE\"]`\n- `COLORS[\"PINK\"]`\n- `COLORS[\"CYAN\"]`\n- `COLORS[\"WHITE\"]`\n- `COLORS[\"BLACK\"]`\n- `COLORS[\"GRAY\"]`\n- `COLORS[\"BROWN\"]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faramshiva%2Fboids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faramshiva%2Fboids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faramshiva%2Fboids/lists"}