{"id":18648382,"url":"https://github.com/taiyu-len/continuation-behavior-tree","last_synced_at":"2025-11-05T08:30:20.781Z","repository":{"id":97542610,"uuid":"159453329","full_name":"taiyu-len/continuation-behavior-tree","owner":"taiyu-len","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-27T05:36:18.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T12:28:01.117Z","etag":null,"topics":["behavior-tree"],"latest_commit_sha":null,"homepage":"","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/taiyu-len.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":"2018-11-28T06:17:52.000Z","updated_at":"2020-02-27T05:36:21.000Z","dependencies_parsed_at":"2023-03-13T16:11:34.143Z","dependency_job_id":null,"html_url":"https://github.com/taiyu-len/continuation-behavior-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiyu-len%2Fcontinuation-behavior-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiyu-len%2Fcontinuation-behavior-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiyu-len%2Fcontinuation-behavior-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiyu-len%2Fcontinuation-behavior-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taiyu-len","download_url":"https://codeload.github.com/taiyu-len/continuation-behavior-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239450394,"owners_count":19640713,"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":["behavior-tree"],"created_at":"2024-11-07T06:30:38.404Z","updated_at":"2025-11-05T08:30:20.703Z","avatar_url":"https://github.com/taiyu-len.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"An WIP implementation of behavior trees using continuations designed to work\nwith asio\n\nthe `behavior` is a smart pointer wrapping an object satisfying one of these\nrequirements.\n- is invocable as `status()`\n  - used for leaf nodes that only `continues::up` the tree\n    ```c++\n    behavior x = []{ do_stuff(); return status::success; };\n    ```\n- is invocable as `void(continuation)`\n  - used for leaf nodes that `continues::elsewhere`, that is it moves the\n    continuation to be called later, for async processing\n    ```c++\n    behavior x = [](continuation c)\n    {\n        timer t(some_time);\n        t.async_wait([](...){ do_stuff(); c(); });\n    };\n    ```\n- is invocable as `continues(continuation)`\n  - used for nodes which `continues::down` the tree, as well as either of the\n    above usages\n    ```c++\n    node::operator(continuation r) -\u003e continues\n    {\n        resume_parent = std::move(r);\n        resume_this = [this](status s) -\u003e continues\n        {\n            // random example\n            switch (state()) {\n            case 0: return continues::down(child, resume_this);\n            case 1: return continues::up(std::move(resume_parent), Success);\n            case 2: post(std::move(resume_parent));\n                    return continues::elsewhere();\n            }\n        }\n        return continues::down(child, resume_this);\n    }\n    ```\n\nUnlike regular behavoir trees, there is no `Running` state due to the\ncontinuations, since we simply continue the tree by calling them once we finish\na task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiyu-len%2Fcontinuation-behavior-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaiyu-len%2Fcontinuation-behavior-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiyu-len%2Fcontinuation-behavior-tree/lists"}