logoalt Hacker News

Show HN: Go-Bt: Minimalist Behavior Trees for Go

29 pointsby rvitorpertoday at 2:33 PM2 commentsview on HN

Hey HN,

I just published v0.1.0 of go-bt and would love some feedback from the Go veterans here.

Thanks in advance!


Comments

dgb23today at 5:02 PM

Not a Go veteran, but I implememted a behavior tree in a little simulation game prototype. Looked very similar structurally but your version is nicer.

As an aside:

I don’t particularly like behavior trees. Not sure why, but they feel brute-force-y to me, and I find them much harder to reason about than state machines. Once you express state machines as data, they can become just as powerful and feel less fiddly.

A different thought I have that I couldn’t get around exploring is to implement behavior trees with channels (no go routines). But that’s just a vague notion.

There was a article from Russ Cox „Storing Data in Control Flow“. Maybe there‘s something there?

show 1 reply
emanuele-emtoday at 3:47 PM

The clock injection for testing temporal nodes is a really nice touch. Most BT libraries force you to actually wait or mock everything yourself. This would work well for orchestrating retries and fallback logic in microservices, not just game AI. Any plans for parallel composite nodes?

redohtoday at 4:33 PM

[dead]