RepositoryRustNONa Uy
Sollimann

Sollimann/bonsai

Rust implementation of behavior trees for deterministic AI (now with Python bindings)

1.1ksao
42fork
8issue
5lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: autonomous-robots

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: behavior-tree

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: piston

#1 Repository của tuần

🌲 Bonsai — Thư viện Behavior Tree bằng Rust cho AI xác định

Rust implementation of Behavior Trees — now with Python bindings.

Bonsai là triển khai Behavior Tree (cây hành vi) bằng Rust, hướng đến AI xác định (deterministic). Thư viện cung cấp hệ thống node combinator phong phú — Sequence, Select, If, Invert, While, WhenAll, WhenAny, Race, After — cho phép xây dựng hệ thống hành vi modular và phản ứng nhanh. Dự án hiện có cả bindings cho Python qua bonsai-bt trên PyPI, mở rộng khả năng sử dụng ngoài hệ sinh thái Rust.

✨ Điểm nổi bật

  • Combinator phong phú: Hỗ trợ Sequence, Select, If, Invert, While, WhenAll, WhenAny, Race, After — bao phủ hầu hết mẫu cấu trúc hành vi.
  • Rust + Python: Core bằng Rust đảm bảo hiệu năng, có Python bindings cho phép sử dụng trong cả hệ sinh thái Python.
  • Non-blocking tasks: Long-running tasks được dispatch vào background thread qua channel, giữ cho behavior tree luôn responsive.
  • Deterministic AI: Thiết kế hướng đến hành vi xác định — quan trọng trong robotics và autonomous systems.
  • Cargo + PyPI: Cài đặt đơn giản qua cargo add bonsai-bt hoặc pip install bonsai-bt.
  • Minimum Rustc 1.72: Sử dụng Rust phiên bản ổn định, không cần nightly.
  • Async drone example: Ví dụ minh họa cách xử lý tác vụ bất đồng bộ trong behavior tree.

💡 Vì sao đáng chú ý

Behavior Tree là cấu trúc dữ liệu phổ biến trong game AI và robotics để xây dựng hệ thống hành vi modular, phản ứng nhanh. Bonsai giải quyết bài toán "block tree traversal" bằng cách dispatch long-running tasks sang background thread — điều mà nhiều triển khai khác bỏ qua. Sự kết hợp Rust (hiệu năng, safety) + Python bindings (tốc độ phát triển) làm cho Bonsai phù hợp cho cả nghiên cứu và sản phẩm thực tế, từ autonomous robot đến NPC trong game.

So với việc tự xây dựng FSM (finite state machine) thủ công, Bonsai cho phép compose hành vi phức tạp từ các node đơn giản thông qua combinator — dễ đọc, dễ bảo trì, dễ mở rộng.


#BehaviorTree #Rust #AI #Robotics #PythonBindings #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC++
recastnavigation/recastnavigation

Industry-standard navigation-mesh toolset for games

8.3k
Feb 27, 2026
RepositoryRust
bevyengine/bevy

A refreshingly simple data-driven game engine built in Rust

50.1k
Nov 29, 2026
RepositoryJavaScript
4ian/GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.

29.5k
Dec 1, 2026
RepositoryRust
kitao/pyxel

A retro game engine for Python

18.7k
Nov 28, 2026
RepositoryC++
bulletphysics/bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

14.9k
Oct 9, 2026
RepositoryGo
hajimehoshi/ebiten

A dead simple 2D game engine for Go

13.7k
Nov 30, 2026
RepositoryDart
flame-engine/flame

A Flutter based game engine.

10.8k
Dec 2, 2026
RepositoryC++
endless-sky/endless-sky

Space exploration, trading, and combat game.

7.8k
Nov 29, 2026
RepositoryJava
00-Evan/shattered-pixel-dungeon

Shattered Pixel Dungeon is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. It's based on the source code of Pixel Dungeon, by Watabou.

6.9k
Nov 25, 2026