{"id":22155925,"url":"https://github.com/citiususc/hipster","last_synced_at":"2025-04-04T15:09:35.675Z","repository":{"id":7774628,"uuid":"9143933","full_name":"citiususc/hipster","owner":"citiususc","description":"Hipster4j is a lightweight and powerful heuristic search library for Java and Android. It contains common, fully customizable algorithms such as Dijkstra, A* (A-Star), DFS, BFS, Bellman-Ford and more.","archived":false,"fork":false,"pushed_at":"2023-06-14T22:29:37.000Z","size":5735,"stargazers_count":325,"open_issues_count":29,"forks_count":87,"subscribers_count":27,"default_branch":"1.0.X","last_synced_at":"2025-03-28T14:07:42.789Z","etag":null,"topics":["android","dijkstra","graph-search","heuristic-search","hipster4j","java","search-algorithm","shortest-paths"],"latest_commit_sha":null,"homepage":"http://hipster4j.github.io","language":"Java","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/citiususc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2013-04-01T08:42:29.000Z","updated_at":"2025-01-27T20:52:45.000Z","dependencies_parsed_at":"2024-12-02T02:49:52.718Z","dependency_job_id":null,"html_url":"https://github.com/citiususc/hipster","commit_stats":{"total_commits":663,"total_committers":18,"mean_commits":"36.833333333333336","dds":0.3227752639517345,"last_synced_commit":"26bed7926306f8ef80dd0a0c0c7bcd2d5a771d83"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fhipster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fhipster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fhipster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fhipster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citiususc","download_url":"https://codeload.github.com/citiususc/hipster/tar.gz/refs/heads/1.0.X","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198463,"owners_count":20900080,"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":["android","dijkstra","graph-search","heuristic-search","hipster4j","java","search-algorithm","shortest-paths"],"created_at":"2024-12-02T02:33:17.450Z","updated_at":"2025-04-04T15:09:35.658Z","avatar_url":"https://github.com/citiususc.png","language":"Java","readme":"![Hipster](src/main/doclava/custom/assets/hipster-template/assets/images/header-logo.png?raw=true)\n\n![CI](https://github.com/citiususc/hipster/actions/workflows/maven.yml/badge.svg)\n[![](https://jitpack.io/v/citiususc/hipster.svg)](https://jitpack.io/#citiususc/hipster)\n\nA powerful and friendly heuristic search library implemented in Java.\n\n## What's Hipster4j?\n\nThe aim of Hipster4j is to provide an easy to use yet powerful and flexible type-safe Java library for heuristic search. \nHipster relies on a flexible model with generic operators that allow you to reuse and change the behavior of the algorithms very easily. Algorithms are also implemented in an iterative way, avoiding recursion. This has many benefits: full control over the search, access to the internals at runtime or a better and clear scale-out for large search spaces using the heap memory.\n\nYou can use Hipster4j to solve from simple graph search problems to more advanced state-space search problems where the state space is complex and weights are not just double values but custom defined costs.\n\n## Features\n\nThe current version of the library comes with some very well-known and wide used search algorithms. We're working to add more algorithms soon:\n\n* Search algorithms:\n    * Uninformed search:\n        * DFS: Depth-First-Search.\n        * BFS: Breadth-First-Search.\n        * Dijkstra's algorithm.\n        * Bellman-Ford.\n    * Informed search:\n        * A star (A*).\n        * IDA star (IDA*), Iterative Deepening A*.\n        * AD star (AD*): Anytime Dynamic A*.\n    * Local search:\n        * Hill-Climbing.\n        * Enforced-Hill-Climbing.\n    * Multiobjective search\n        * Multiobjective LS algorithm. Original paper: Martins, E. D. Q. V., \u0026 Santos, J. L. E. (1999). *\"The labeling algorithm for the multiobjective shortest path problem\"*. \u003ci\u003eDepartamento de Matematica, Universidade de Coimbra, Portugal, Tech. Rep. TR-99/005\u003c/i\u003e ([see an example](https://github.com/citiususc/hipster/wiki/Multiobjective-Search-with-Hipster-and-TinkerPop-Blueprints))\n* 3rd party adapters:\n    * [Java Universal/Graph (JUNG)](http://jung.sourceforge.net/) adapter.\n\nIf you don't find the algorithm or the feature you are looking for, please consider contributing to Hipster!. You can open a new issue or better fork this repository and create a pull request with your contribution.\n\n## Getting started\n\nThe easiest way to use Hipster is adding it as a dependency with your favourite dependency manager.\nMaven users can include the library using the following snippet:\n\n#### Snapshots\n\nYou can use the latest (unstable) version of Hipster under development. Just add the following dependency into your pom.xml:\n\n```xml\n\u003c!-- Use sonatype oss public for snapshots --\u003e\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003esonatype-oss-public\u003c/id\u003e\n    \u003curl\u003ehttps://oss.sonatype.org/content/groups/public/\u003c/url\u003e\n    \u003csnapshots\u003e\n      \u003cenabled\u003etrue\u003c/enabled\u003e\n    \u003c/snapshots\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n  \u003c!-- \n    Add this dependency under your pom.xml \u003cdependencies\u003e section to add\n    all the dependencies of Hipster to your project. Add hipster-core\n    instead of hipster-all for basic functionality.\n  --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ees.usc.citius.hipster\u003c/groupId\u003e\n    \u003cartifactId\u003ehipster-all\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.2-SNAPSHOT\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n#### Releases\n\nCurrent stable release is v1.0.1. See the [milestones](https://github.com/citiususc/hipster/milestones) to check the current development status.\n\n```xml\n\u003cdependencies\u003e\n  \u003c!--\n    Add this dependency under your pom.xml \u003cdependencies\u003e section to add\n    all the dependencies of Hipster to your project. Add hipster-core\n    instead of hipster-all for core functionality.\n  --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ees.usc.citius.hipster\u003c/groupId\u003e\n    \u003cartifactId\u003ehipster-all\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.1\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n#### Quick Example\n\nLet's solve the graph used in [this Wikipedia article](http://en.wikipedia.org/wiki/Shortest_path_problem)\nabout Shortest paths.\n\n![DirectedGraph](http://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Shortest_path_with_direct_weights.svg/512px-Shortest_path_with_direct_weights.svg.png)\n\nAlthough Hipster is graph agnostic, we include some useful classes to create a graph or a\ndirected graph and the search problem. We create a graph using the GraphBuilder class and then\nwe use the GraphSearchProblem to create the required components to solve it using Dijkstra's algorithm:\n\n```java\n// Create a simple weighted directed graph with Hipster where\n// vertices are Strings and edge values are just doubles\nHipsterDirectedGraph\u003cString,Double\u003e graph = \n    GraphBuilder.\u003cString,Double\u003ecreate()\n     .connect(\"A\").to(\"B\").withEdge(4d)\n     .connect(\"A\").to(\"C\").withEdge(2d)\n     .connect(\"B\").to(\"C\").withEdge(5d)\n     .connect(\"B\").to(\"D\").withEdge(10d)\n     .connect(\"C\").to(\"E\").withEdge(3d)\n     .connect(\"D\").to(\"F\").withEdge(11d)\n     .connect(\"E\").to(\"D\").withEdge(4d)\n     .createDirectedGraph();\n\n// Create the search problem. For graph problems, just use\n// the GraphSearchProblem util class to generate the problem with ease.\nSearchProblem p = GraphSearchProblem\n                           .startingFrom(\"A\")\n                           .in(graph)\n                           .takeCostsFromEdges()\n                           .build();\n                           \n// Search the shortest path from \"A\" to \"F\"\nSystem.out.println(Hipster.createDijkstra(p).search(\"F\"));\n```\n\nOutput result:\n`Total solutions: 1\nTotal time: 6 ms\nTotal number of iterations: 6\n+ Solution 1: \n - States: \n\t[A, C, E, D, F]\n - Actions: \n\t[2.0, 3.0, 4.0, 11.0]\n - Search information: \n\tWeightedNode{state=F, cost=20.0, estimation=0.0, score=20.0}`\n\nBut that's not all. Hipster comes with different problem examples\nthat illustrate how Hipster can be used to solve a [wide variety of problems](https://github.com/citiususc/hipster/tree/0c0ec9cb5087fede9930a6efbd5126afd69896ac/hipster-examples/src/main/java/es/usc/citius/hipster/examples) (not only graph search).\n\n## What's next?\n\nIf you want to learn how to solve a problem by searching with Hipster, check the [wiki](https://github.com/citiususc/hipster/wiki) and the [JavaDoc documentation](http://www.hipster4j.org/hipster-javadocs).\nWe also suggest you to check [this presentation](https://speakerdeck.com/pablormier/hipster-an-open-source-java-library-for-heuristic-search) for a quick introduction.\n\n## License \u0026 Citation\n\nThis software is licensed under the Apache 2 license, quoted below.\n\n    Copyright 2013 Centro de Investigación en Tecnoloxías da Información (CITIUS),\n    University of Santiago de Compostela (USC).\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    \n    \n\n### Citation\n\nThis library was presented in the \"9th Iberian Conference on Information Systems and Technologies (CISTI), 2014\". If you use this library in your research projects, we encourage you to please cite our work: \n\n\u003e Rodriguez-Mier, P., Gonzalez-Sieira, A., Mucientes, M., Lama, M. \u0026 Bugarin, A. (2014). **Hipster: An Open Source Java Library for Heuristic Search**. _9th Iberian Conference on Information Systems and Technologies (CISTI)_.\n\n```\n@inproceedings{RodriguezMier2014,\n  author = {Rodriguez-Mier, Pablo and Gonzalez-Sieira, Adrian and Mucientes, Manuel and and Lama, Manuel and Bugarin, Alberto},\n  booktitle = {9th Iberian Conference on Information Systems and Technologies (CISTI 2014)},\n  month = jun,\n  volume = 1,\n  title = {{Hipster: An Open Source Java Library for Heuristic Search}},\n  pages = {481--486},\n  isbn = \"978-989-98434-2-4\"\n  address = \"Barcelona\",\n  year = {2014}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fhipster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitiususc%2Fhipster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fhipster/lists"}