-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utility AI inclusion #97
base: master
Are you sure you want to change the base?
Conversation
I've updated RandomSelector to set in a known state each time it starts(). Pre this fix I was finding it could attempt to run in a state of runningChild = null and currentChildIndex = children.size.
A flawed, first attempt at implementing a pathfinder that will terminate upon the location of an active item type rather than a specific node. TerminationCondition will set the endNode. I havent got this working properly. One then needs to override Node equals operator IndexedAStarPathFinderWithTerminationCondition<Node> pathFinder = new IndexedAStarPathFinderWithTerminationCondition<Node>(graph){ @OverRide public boolean isTerminationConditionSatisfied(Node current, Node target) { if (current.extraInfo != null) { if (current.extraInfo instanceof Trigger_Food) { Trigger_Food<MyActor> trig = (Trigger_Food<MyActor>) current.extraInfo; if(trig.isTriggerActive()){ //clone, dont like but it works target.pos = current.pos; target.index = current.index; return true; } } } return false; } };
A flawed, first attempt at implementing a pathfinder that will terminate upon the location of an active item type rather than a specific node. TerminationCondition will set the endNode. I havent got this working properly. One will then need to override Node equals operator. Example usage: IndexedAStarPathFinderWithTerminationCondition<Node> pathFinder = new IndexedAStarPathFinderWithTerminationCondition<Node>(graph){ @OverRide public boolean isTerminationConditionSatisfied(Node current, Node target) { if (current.extraInfo != null) { if (current.extraInfo instanceof Trigger_Food) { Trigger_Food<MyActor> trig = (Trigger_Food<MyActor>) current.extraInfo; if(trig.isTriggerActive()){ //clone, dont like but it works target.pos = current.pos; target.index = current.index; return true; } } } return false; } };
@felixvolz Is there any progress with this type of AI and guidance how to use it? |
I think this gdxai project is dead? Feel free to do what you will with the utility ai code |
Project certainly seems dead. I don't think it could use GPL code even if it was alive, though, since all of the gdx projects are permissively licensed under Apache 2.0, and including any GPL code would make the project GPL as I understand it. I think most commercial projects avoid including GPL code like the plague... |
I was about to close this, but then I noticed that the project this is based on (CrystalAI) changed its license to MIT about 4 months ago. I think that would enable us to use this code now. There are some problems, though -- much of the docs use C#-style |
This UtilityAI is based on the https://github.com/igiagkiozis/CrystalAI (released under the GPL v3 license)
There is a Sample app in UtilityTest app: gdx-ai\tests\src\com\badlogic\gdx\ai\tests\UtilityTest.java
If you find this of use, I can tidy up to conform to gdx-ai requirements
See Class Diagram below