{"id":16214628,"url":"https://github.com/lfeq/flocking-algorithm","last_synced_at":"2025-04-07T22:29:36.168Z","repository":{"id":191710547,"uuid":"685234601","full_name":"lfeq/Flocking-Algorithm","owner":"lfeq","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-31T02:44:52.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T23:45:03.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfeq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-08-30T19:45:13.000Z","updated_at":"2023-08-30T19:45:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"beb1f24f-6e8f-4983-ae40-c42f77994df8","html_url":"https://github.com/lfeq/Flocking-Algorithm","commit_stats":null,"previous_names":["lfeq/flocking-algorithm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FFlocking-Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FFlocking-Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FFlocking-Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FFlocking-Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfeq","download_url":"https://codeload.github.com/lfeq/Flocking-Algorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247740202,"owners_count":20988170,"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":[],"created_at":"2024-10-10T11:11:47.788Z","updated_at":"2025-04-07T22:29:36.157Z","avatar_url":"https://github.com/lfeq.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flocking-Algorithm\n\nThis repository contains the code for a flock simulation. The simulation consists of a number of agents that move around the screen, following certain rules. The rules are implemented as \"flock behaviours\" and can be added or removed to change the behaviour of the agents.\n\n### Code Structure\n\nThe code is organized into a number of scripts:\n\n* **FlockAgent.cs**: This script is attached to each agent in the simulation. It contains the agent's movement logic and handles collision with other agents.\n* **FlockBehaviour.cs**: This abstract class defines the interface for flock behaviours. Subclasses of this class implement the specific behaviour of each flock.\n* **FlockManager.cs**: This script manages the flock of agents. It controls the behaviour of the flock by specifying agent properties and their interactions based on a provided flock behaviour.\n* **AlligmentBehaviour.cs**: This behaviour aligns the movement of an agent with the average direction of nearby agents.\n* **AvoidanceBehaviour.cs**: This behaviour guides an agent to avoid colliding with nearby agents.\n* **CohesionBehaviour.cs**: This behaviour guides an agent to move closer to the center of nearby agents.\n* **CompositeBehaviour.cs**: This behaviour combines multiple behaviours with corresponding weights.\n* **StayInRadiusBehavior.cs**: This behaviour keeps agents within a specified radius from a center point.\n\n### How to Use\n\nTo use the simulation, simply import the project into Unity and press play. You can change the behaviour of the agents by adding or removing flock behaviours from the FlockManager.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfeq%2Fflocking-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfeq%2Fflocking-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfeq%2Fflocking-algorithm/lists"}