[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94944":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":9,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":16,"hasPages":16,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":18,"readmeContent":19,"aiSummary":20,"trendingCount":14,"starSnapshotCount":14,"syncStatus":21,"lastSyncTime":9,"discoverSource":22},94944,"bonsai","Sollimann\u002Fbonsai","Sollimann","Rust implementation of behavior trees for deterministic AI (now with Python bindings)",null,"https:\u002F\u002Fgithub.com\u002FSollimann\u002Fbonsai","Rust",936,38,0,45.77,false,"main","2026-08-24 04:01:23","\u003Ch1 align=\"center\" style=\"font-family:Papyrus; font-size:4em;\"> Bonsai 盆栽 \u003C\u002Fh1>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FSollimann\u002Fbonsai\u002Fblob\u002Fmain\u002Fdocs\u002Fresources\u002Fgifs\u002Fbonsai.gif\" width=\"350\" \">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cem>Rust implementation of Behavior Trees\u003C\u002Fem>\n\u003C\u002Fp>\n\n\u003C!-- [![version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-1.0.0-blue)](https:\u002F\u002FGitHub.com\u002FSollimann\u002FCleanIt\u002Freleases\u002F) -->\n[![Build Status](https:\u002F\u002Fgithub.com\u002FSollimann\u002Fbonsai\u002Factions\u002Fworkflows\u002Frust-ci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSollimann\u002Fbonsai\u002Factions)\n[![Bonsai crate](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fbonsai-bt.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fbonsai-bt)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fbonsai-bt.svg?label=pypi%20%28bonsai-bt%29)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fbonsai-bt\u002F)\n[![minimum rustc 1.72](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frustc-1.72+-blue.svg)](https:\u002F\u002Frust-lang.github.io\u002Frfcs\u002F2495-min-rust-version.html)\n[![Docs](https:\u002F\u002Fdocs.rs\u002Fbonsai-bt\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Fbonsai-bt)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002FSollimann\u002Fbonsai\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=JX8JBPWORV)](https:\u002F\u002Fcodecov.io\u002Fgh\u002FSollimann\u002Fbonsai)\n[![Maintenance](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMaintained%3F-yes-green.svg)](https:\u002F\u002FGitHub.com\u002FSollimann\u002Fbonsai\u002Fgraphs\u002Fcommit-activity)\n[![GitHub pull-requests](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-pr\u002FSollimann\u002Fbonsai.svg)](https:\u002F\u002FGitHub.com\u002FSollimann\u002Fbonsai\u002Fpulls)\n[![GitHub pull-requests closed](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-pr-closed\u002FSollimann\u002Fbonsai.svg)](https:\u002F\u002FGitHub.com\u002FSollimann\u002Fbonsai\u002Fpulls)\n![ViewCount](https:\u002F\u002Fviews.whatilearened.today\u002Fviews\u002Fgithub\u002FSollimann\u002Fbonsai.svg)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\n## Contents\n\n* [Quick intro to Behavior Trees](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=KeShMInMjro)\n* [Concepts](docs\u002Fconcepts\u002FREADME.md)\n* [Examples](examples\u002FREADME.md)\n* [Development Guide](DEVELOPMENT.md)\n* [Kanban Board](https:\u002F\u002Fgithub.com\u002Fusers\u002FSollimann\u002Fprojects\u002F9\u002Fviews\u002F1)\n* [Honorable Mentions](#similar-crates)\n\n## Using Bonsai\n\n### Rust\n\nBonsai is available on crates.io. The recommended way to use it is to add a line into your Cargo.toml such as:\n\n```toml\n[dependencies]\nbonsai-bt = \"*\"\n```\n\n### Python\n\nBonsai is available on PyPI as [**`bonsai-bt`**](https:\u002F\u002Fpypi.org\u002Fproject\u002Fbonsai-bt\u002F):\n\n```bash\npip install bonsai-bt\n```\n\nSee [`bonsai-py\u002F`](bonsai-py\u002F) for examples.\n\n## Example of use\n\nSee [Examples](examples\u002FREADME.md) folder.\n\n## What is a Behavior Tree?\n\nA _Behavior Tree_ (BT) is a data structure in which we can set the rules of how certain _behavior's_ can occur, and the order in which they would execute. BTs are a very efficient way of creating complex systems that are both modular and reactive. These properties are crucial in many applications, which has led to the spread of BT from computer game programming to many branches of AI and Robotics.\n\n### How to use a Behavior tree?\n\nA Behavior Tree forms a tree structure where each node represents a process. When the process terminates, it signals `Success` or `Failure`. This can then be used by the parent node to select the next process. A signal `Running` is used to tell the process is not done yet.\n\nFor example, if you have a state `A` and a state `B`:\n\n- Move from state `A` to state `B` if `A` succeeds: `Sequence([A, B])`\n- Try `A` first and then try `B` if `A` fails: `Select([A, B])`\n- If `condition` succeedes do `A`, else do `B` : `If(condition, A, B)`\n- If `A` succeeds, return failure (and vice-versa): `Invert(A)`\n- Do `A`, `B` repeatedly while `LoopCondition` runs: `While(LoopCondition, [A, B])`. Checks condition node between nodes `A`, `B`.\n- Do `A`, `B` forever: `While(WaitForever, [A, B])`\n- Do `A`, `B` repeatedly while `LoopCondition` runs: `WhileAll(LoopCondition, [A, B])`. After *All* nodes `A`, `B` are completed successfully, check the condition node.\n- Run `A` and `B` in parallell and wait for both to succeed: `WhenAll([A, B])`\n- Run `A` and `B` in parallell and wait for any to succeed: `WhenAny([A, B])`\n- Run `A` and `B` in parallell and wait for any to complete regardless of success or failure: `Race([A, B])`\n- Run `A` and `B` in parallell, but `A` has to succeed before `B`: `After([A, B])`\n\nSee the `Behavior` enum for more information.\n\n### Calling long-running tasks in behavior tree\n\nTo make sure that the behavior tree is always responsive, it is important that the actions that are created executes instantly so that they do not block the tree traversal. If you have long-running tasks\u002Ffunctions that can take seconds or minutes to execute - either `async` or `sync` - then we can dispatch those jobs into background threads, and get status of the task through a channel.\n\nsee *async drone* example in the `\u002Fexamples` folder for more details.\n","Bonsai 是一个用于构建确定性人工智能行为树（Behavior Tree）的 Rust 库，支持 Python 绑定。其核心功能包括节点组合（Sequence、Selector、Decorator 等）、运行时状态管理、可序列化树结构及跨语言调用能力；采用零成本抽象设计，保证执行确定性与高性能。适用于游戏 AI、机器人任务编排、无人系统决策逻辑等需模块化、可调试、强响应性的实时控制场景。",2,"trending"]