fluid-hierarchical-task-network
fluid-hierarchical-task-network copied to clipboard
C++ version
C++ Version PR
Description
Implements a C++ version of Fluid-HTN.
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x ] This change requires a documentation update
How Has This Been Tested?
Includes the Unit Tests (barring a couple which test for Nulls where the C++ version is passing references) Also tested cursorily with the C++ port of the Text Adventure sample.
(https://github.com/accesshoops/fluid-text-adventure/tree/master/Fluid%20Text%20Adventure, separate PR to follow there)
Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x ] I have added tests that prove my fix is effective or that my feature works
- [x ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
I was thinking of integrating this in Godot Engine.
Doctest is better than GoogleTest and CPPUnit.
Not sure how updates from c# will work.
Any comments, questions or jokes?
Any updates from C# have to be done manually, which is not a very sustainable approach, but adequate for my personal needs. Doesn't godot support C# ?
As far as test frameworks go, I dislike having to install additional software (especially with C++ where you don't have a nice clean story like NuGet) so I went with MSTest. Feel free to fork and do whatever you like though :)
I personally don't use c#.
Godot supports C# but it's not the default and there are proposals to move C# support to a shared library rather than a secondary official build.
Are you aware that Doctest is a single c++ header and only the header is required in a program?
https://github.com/onqtam/doctest/blob/master/doctest/doctest.h
My goal of this conversation is to collaborate as much as possible.
In the end, I think having a proper cross-platform test framework is a good idea. There is no valid reason to keep it tied to MSTest for ever, just my own preferences. From that perspective, doctest is certainly more attractive than gtest because it would be header-only, just like the framework itself.
However, the project I did this port for is on the back burner and may end up being canned. If your intention is to have a well-supported version that is properly updated it may be best to fork my repo and maintain it yourself.
Not trying to be a jerk, I just cannot provide the commitment needed in order to be a good steward.
You can even make your own PR as a more sustainable C++ port and I will have no objection to closing this one.
In the end, I think having a proper cross-platform test framework is a good idea. There is no valid reason to keep it tied to MSTest for ever, just my own preferences. From that perspective, doctest is certainly more attractive than gtest because it would be header-only, just like the framework itself.
However, the project I did this port for is on the back burner and may end up being canned. If your intention is to have a well-supported version that is properly updated it may be best to fork my repo and maintain it yourself.
Not trying to be a jerk, I just cannot provide the commitment needed in order to be a good steward.
You can even make your own PR as a more sustainable C++ port and I will have no objection to closing this one.
@amoldeshpande Is it okay if I maintain a version of your c++ port for Godot and use it in my games? Do you want me to include any extra license for the code you wrote?
C++ Code lives at : https://github.com/kthecoder/AIBlue/tree/main/extension/src/FluidHTN Tests live at : https://github.com/kthecoder/AIBlue/tree/main/test/cpp/fluidhtn_tests
I have also ported the tests to Google Test, because that was the test framework I could actually get to work on my computer lol.
@kthecoder Do feel free to use the code any way you wish, without any additional licensing on my code. Good luck with your games!
Thanks for the update - for me I ported the HTN framework from Dana https://github.com/dananau/GTPyhop
https://github.com/V-Sekai/godot-task-goal-planner