Comments (14)
If you have any ideas, we can github discuss it!
from hfsm2.
Very cool, I'm happy for you to use the library in Godot Engine, so long as it's done in line with the MIT license https://github.com/andrew-gresyk/HFSM2/blob/master/LICENSE.
from hfsm2.
See https://github.com/godotengine/godot/blob/master/LICENSE.txt.
You mentioned that planner part of this library isn't here. There are a lot of GPL3 or more restrictive licenses on github. It was very hard to find a HDDL library :( I think I'd have to work on one.
from hfsm2.
Yep, HFSM2 can execute plans but it doesn't have a planner.
I'm considering making a generic planner compatible with HFSM2 / FFSM2, however, the idea hasn't crystallized in my head yet.
from hfsm2.
@andrew-gresyk are you insistent on catch2? Godot uses doctest so I was curious.
from hfsm2.
Phil Nash recommended it, and it worked for me.
Is it https://github.com/onqtam/doctest you're using at Godot?
from hfsm2.
Yeah. We're using doctest. I was curious.
from hfsm2.
Switched to doctest BTW, for a x2 build speedup.
Thanks for the hint!
from hfsm2.
Since I got an email tracking this, I'm currently trying https://github.com/V-Sekai/godot-tfd based on the work by @debbynirwan
My unit tests show https://github.com/V-Sekai/godot-tfd/blob/main/tests/test_tfd_travel.h how to use tfd.
from hfsm2.
Reading backwards, I think you suggested we can combine a planner like TFD (Hierarchical Task Network Planner) with HFSM2.
from hfsm2.
Interesting, I'll have a look at TFD, ty.
Yeah, for an example of using plans, see https://github.com/andrew-gresyk/HFSM2/blob/master/test/test_plans.cpp
from hfsm2.
Dana wrote a great diagram explaining the problem.
http://www.cs.umd.edu/~nau/papers/nau2013game.pdf
from hfsm2.
Yeah makes sense.
A couple points about plans in HFSM2 and FFSM2:
- plans are 'attached' to regions, and accessed via
control.plan<Region>()
orcontrol.plan()
for the current region - plan is a sequence of transitions, which can be appended to it using
plan.change<TOrigin, TDestination>()
orplan.change(originIndex, destinationIndex)
(all transition types are supported) - if
TOrigin
state callsControl::succeed()
- planning step (for that region) has succeeded and the FSM will transition toTDestination
state - if
TOrigin
state callsControl::fail()
- plan (for that region) has failed Region::planSucceeded()
andRegion::planFailed()
will be called when the plan 'attached' to that region succeeds or fails- if a region doesn't define
planSucceeded()
andplanFailed()
, they will propagate up the hierarchy, all the way to the root
With that, one can build hierarchical plans.
To integrate the planner with the FSM plan execution, a mapping between actions (methods?) and states has to be defined.
There's also a slightly different example in FFSM2: https://github.com/andrew-gresyk/FFSM2/blob/master/test/test_plans.cpp
Which would still work in HFSM2
from hfsm2.
Since I have stopped working on this. I'll close it and reopen later. Thanks.
from hfsm2.
Related Issues (20)
- "Fully static, no dynamic allocations" but "new" used several times HOT 2
- Compile error in B_<TFirst>::stateId() HOT 3
- The logger can freeze due to unknown methods HOT 5
- Only one headless region is allowed in an FSM instance HOT 1
- Trouble with HFSM2 master version in MSVC2019 16.6.5 HOT 9
- Can't get Context from Control in Utility function HOT 2
- Usage within ecs systems like entt HOT 2
- Using in embedded systems HOT 3
- Port travis to Github Actions HOT 3
- Looped plan HOT 2
- State machine stuck in update method HOT 3
- Macro conflict between sys/ioctl.h and hfsm2/machine.hpp HOT 4
- thread-safe?
- How get machine state id? HOT 4
- Fetching payload contents HOT 2
- Broken links in doc HOT 1
- Does it support writing the states in different files? HOT 1
- State members? HOT 2
- Any example about "Hierarchical" ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hfsm2.