yaml, erb, and behavior trees

A

Andrew Wagner

[Note: parts of this message were removed to make it a legal post.]

Hi all,
So, last week, I announced my new behavior tree library. Since them, I've
started trying to apply them to ruby-warrior, for fun, and to improve the
library. I'm quickly realizing that I need an even easier front end for it.
So, I'm thinking something like this would be useful:

select make_empty:
-
- empty: <%= lambda {|e| e.empty? } %>
- sequence:
- pop: <%= lambda {|e| e.pop? } %>
- make_empty

Yup, that's YAML, with ERB embedded in it. How hard would it be to take a
structure like this and turn it into a sensible hash/array structure? Would
I be better off just leaving the lambdas as strings, and eval'ing them?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top