{"id":23921575,"url":"https://github.com/nishantholla/a-star-visualizer","last_synced_at":"2026-06-13T18:38:25.626Z","repository":{"id":270963861,"uuid":"911981626","full_name":"nishantHolla/a-star-visualizer","owner":"nishantHolla","description":"Visualizer for A* algorithm in c using raylib","archived":false,"fork":false,"pushed_at":"2025-07-04T09:46:50.000Z","size":17720,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T10:39:11.365Z","etag":null,"topics":["a-star-algorithm","c","pathfinding","raylib","raylib-c"],"latest_commit_sha":null,"homepage":"","language":"C","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/nishantHolla.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":"2025-01-04T11:25:25.000Z","updated_at":"2025-07-04T09:46:53.000Z","dependencies_parsed_at":"2025-05-11T22:30:33.106Z","dependency_job_id":null,"html_url":"https://github.com/nishantHolla/a-star-visualizer","commit_stats":null,"previous_names":["nishantholla/a-star-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nishantHolla/a-star-visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantHolla%2Fa-star-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantHolla%2Fa-star-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantHolla%2Fa-star-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantHolla%2Fa-star-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishantHolla","download_url":"https://codeload.github.com/nishantHolla/a-star-visualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantHolla%2Fa-star-visualizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34296380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["a-star-algorithm","c","pathfinding","raylib","raylib-c"],"created_at":"2025-01-05T16:18:59.307Z","updated_at":"2026-06-13T18:38:25.620Z","avatar_url":"https://github.com/nishantHolla.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A* visualizer\n\nVisualizer for [A* search algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm) in C using\n[raylib](https://www.raylib.com/).\n\u003cbr /\u003e\n\u003cbr /\u003e\nA* is a pathfinding algorithm that finds the shortest path between source and destination using a goal-directed heuristic.\n\n## Demo\n\nhttps://github.com/user-attachments/assets/4a38f041-a8de-40b0-8c4d-3df8970cda81\n\n## Building using docker\n\n- If you are using linux make sure to run these to use docker buildkit and allow x11 forwarding\n\n```bash\nexport DOCKER_BUILDKIT=1\nxhost +local:root \u003e /dev/null\n```\n\n- If you are using MacOS make sure to run these to use docker buildkit and allow x11 forwarding\n```bash\nexport DOCKER_BUILDKIT=1\n```\nSetting up Docker for gui in mac: [https://gist.github.com/roaldnefs/fe9f36b0e8cf2890af14572c083b516c](https://gist.github.com/roaldnefs/fe9f36b0e8cf2890af14572c083b516c)\n\n- If you are using windows setup WSL and follow the steps for linux machine.\n\n- Clone the repository\n\n```bash\ngit clone https://github.com/nishantHolla/a-star-visualizer\ncd a-star-visualizer\n```\n\n- Run build script to build in debug mode\n\n```bash\n./build.sh debug\n```\n\nor in release mode\n\n```bash\n./build.sh release\n```\n\n- Execute the program\n\n```bash\n./run debug\n```\n\nor if you built in release mode\n\n```bash\n./run release\n```\n\n## About A*\n\nA* is an informed search algorithm that finds the shortest path between a source vertex and a destination\nvertex in a weighted graph. It does this by maintaining a tree of paths originating at the start node\nand extending those paths one edge at a time until the goal node is reached.\n\u003cbr /\u003e\n\u003cbr /\u003e\nAt each iteration of the search, A* holds a cost map of all visited nodes that is calculated by the\nformula\n```math\nf(n) = g(n) + h(n)\n```\nwhere\n\n- $g(n)$ is the cost of the path from the start node to node n\n- $h(n)$ is the heuristic function that approximates how close node n is to the destination node\n- $f(n)$ is the total cost of node n that is used to determine if a node is worthwhile to visit.\n\nThis implementation of A* uses a priority queue to store the neighbors of the current cell with the\npriority of their cost. Since cost must be minimized, the cells with low cost are prioritized over cells\nwith higher cost.\n\u003cbr /\u003e\n\u003cbr /\u003e\nThe heuristic function $h(n)$ estimates how close the current cell is to the destination cell, and can\nbe changed for different graph conditions. In this implementation, where the neighbors of a\nthe cell is defined as the 4 adjacent cells connected by a common edge, the Manhattan distance between the current cell and the destination\ncell is taken as a heuristic which is given by\n```math\nd = |x_2 - x_1| + |y_2 - y_1|\n\n```\n\nFor a graph where diagonal traversal is allowed, Euclidean distance is used as a heuristic which is given\nby\n```math\nd = \\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\n\n```\n\nwhere $`x1`$, $`y1`$, and $`x2`$, $`y2`$ define the coordinates of the current cell and the destination cell.\n\u003cbr /\u003e\n\u003cbr /\u003e\nThe time complexity of A* is given by $`O(b^d)`$ where b is the branching factor and d is the number\nof nodes in the solution\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantholla%2Fa-star-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishantholla%2Fa-star-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantholla%2Fa-star-visualizer/lists"}