Quay lại Trending
RepositoryC#FRPháp
MinaPecheux

MinaPecheux/UnityTutorials-BehaviourTrees

The code for a short tutorial on how to create a simple guard AI using behaviour trees in Unity/C# (in text or video format)!

108sao
17fork
0issue
0lượt xem

🌲 Xây dựng AI tuần tra bằng Behaviour Tree trong Unity

Học cách tạo một AI lính canh bằng behaviour tree trong dưới 30 phút!

Đây là mã nguồn đi kèm với một bài hướng dẫn ngắn (dưới 30 phút) của Mina Pêcheux (tháng 11 năm 2021), giới thiệu cách triển khai mô hình behaviour tree trong Unity bằng C#. Bài học không chỉ giải thích khái niệm cơ bản, mà còn so sánh với finite state machine (FSM) và áp dụng thực tế vào thiết kế một AI lính canh có khả năng tuần tra, phát hiện kẻ địch và tấn công.

Bạn có thể xem bản ghi text trên Medium hoặc video hướng dẫn trên YouTube.

✨ Điểm nổi bật

  • Mô hình behaviour tree: Triển khai lại cấu trúc cây quyết định phân cấp để điều khiển hành vi AI.
  • Tuần tra tự động: AI có thể di chuyển giữa các điểm tuần tra một cách mượt mà.
  • Phát hiện và tấn công kẻ địch: Hệ thống phản ứng với việc xuất hiện kẻ địch và thực hiện hành động tấn công.
  • So sánh với FSM: Trình bày lợi thế của behaviour tree khi mô hình hóa hệ thống phức tạp.
  • Tài nguyên đầy đủ: Bao gồm mô hình 3D, vật liệu, hệ thống hạt và toàn bộ script C# sử dụng trong bài.

💡 Vì sao đáng chú ý

Khác với finite state machine, behaviour tree cung cấp khả năng mở rộng và tái sử dụng cao hơn nhờ cấu trúc phân cấp rõ ràng. Dễ dàng thêm hoặc sửa hành vi mà không ảnh hưởng đến toàn bộ hệ thống. Dễ hiểu và nhanh chóng tiếp cận, đặc biệt phù hợp cho người mới học lập trình AI trong Unity.

#Unity #CSharp #BehaviourTree #AI #GameDevelopment #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
Tencent/xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

10.2k
Nov 21, 2025
RepositoryTypeScript
openclaw/openclaw

The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

395.6k
Dec 2, 2026
RepositoryShell
obra/superpowers

An agentic skills framework & software development methodology that works.

331.2k
Nov 28, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

188.2k
Nov 29, 2026
RepositoryC#
Unity-Technologies/ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.

19.9k
Nov 25, 2026
RepositoryC#
Perfare/AssetStudio

AssetStudio is a tool for exploring, extracting and exporting assets and assetbundles.

15.6k
Dec 8, 2022
RepositoryC#
Cysharp/UniTask

Provides an efficient allocation free async/await integration for Unity.

11.3k
Oct 6, 2026
RepositoryC#
egametang/ET

Unity3D Client And C# Server Framework

10.0k
Nov 23, 2026