Sollimann / bonsai

Rust implementation of AI behavior trees.
MIT License
322 stars 14 forks source link

Find a node editor that can take the behavior tree and convert into a tree/graph #3

Closed Sollimann closed 2 years ago

Sollimann commented 2 years ago

egui_node_graph looks like the best option.

Potential flow:

  1. Create behavior tree
  2. Convert behavior tree to a immutable node grapha
  3. Could use mpsc channels to tell which node is active

We could also have that the behavior tree sets up a websocket service, that writes which node is active. Then a second service will read that and compile the tree. The second service would need to read a json to know how the tree is composed such that it can be visualized.

Sollimann commented 2 years ago

Could also use the nannou library to create a graph/tree structure

image

Sollimann commented 2 years ago

A possible option is to compile the behavior tree to a petgraph, then from a petgraph to a graphviz.dot format for visualization

could then use petgraph_evcxr lib to plot:

Sollimann commented 2 years ago

Imnodes wrapper seems to be the best option: https://github.com/benmkw/imnodes-rs