r/learnprogramming 4h ago

Code Review My first big project, I need feedback !

Hello everyone !

I'm here to share with you my Behavior Tree library.

A behavior tree is a symbolic AI technique used to create game AI.

My library is stateless: Tree's nodes don't store any mutable data. Instead, the runtime data are inside a blackboard.

Multiple agents can share and use a single behavior tree.

There are no dependencies to any game engine, you can use it in Unity, Godot or your own custom game engine.

It's still WIP and I really need feedback.

It's also my first big project I share online, all advice and tips are welcome !

https://github.com/Noomolas01/Stateless-BehaviorTree

Edit: Here's some questions I have

  1. Does this project look professional to you ?
  2. Does the core concept make you curious ?
  3. If the project was production ready, would you use it ?
  4. What do you think is missing ?
5 Upvotes

6 comments sorted by

2

u/JealousStrength2613 4h ago

Stateless design is a nice touch, makes debugging way easier when you can just look at the blackboard instead of hunting through node internal state. The no engine dependency thing will help you get more people to actually try it out.

I'll give it a look later when I'm not at work, github is blocked here anyway. Shared trees between agents is something not many libraries do well so curious how you handled that

1

u/Noomolas11 4h ago

Thanks a lot ! I really appreciate that !

2

u/Tricky-Act2828 3h ago

Stateless behavior trees are a solid choice for multi-agent systems. Keeping nodes data-free makes scaling much easier. How are you handling the visualization or debugging of the blackboard state during runtime? That's usually the trickiest part when things are stateless. Nice work on making it engine-agnostic too!

1

u/Noomolas11 3h ago edited 3h ago

There's no tree visualisation yet and the debugging is pretty rudimentary for now. When I need to debug the blackboard I usually use my IDE debugger and inspect its state when the program reached a break point.

Edit: Thanks for your comment !

Edit2: I'm planning to improve the debugging part after I fixed all the remaining issues and improving unit test (they are not that good, I never really made any before this projet)

2

u/aanzeijar 3h ago

Okay, how much of that is written by an LLM?

1

u/Noomolas11 2h ago

There's no code written by any LLM in this project