From 9dfa81e4dfad5a7e742635515c3677b25b418930 Mon Sep 17 00:00:00 2001 From: linkdd Date: Tue, 9 Jan 2024 03:16:39 +0000 Subject: [PATCH] deploy: eb98b8a07265645313e8186aa90749b4b6816288 --- annotated.html | 16 +- annotated_dup.js | 9 +- ...kit_1_1fsm_1_1simple__machine-members.html | 119 ++++++++ classaitoolkit_1_1fsm_1_1simple__machine.html | 144 ++++++++++ classaitoolkit_1_1fsm_1_1simple__machine.js | 7 + ...lkit_1_1fsm_1_1stack__machine-members.html | 118 ++++++++ classaitoolkit_1_1fsm_1_1stack__machine.html | 140 ++++++++++ classaitoolkit_1_1fsm_1_1stack__machine.js | 6 + classaitoolkit_1_1fsm_1_1state-members.html | 121 ++++++++ classaitoolkit_1_1fsm_1_1state.html | 143 ++++++++++ classaitoolkit_1_1goap_1_1action-members.html | 6 +- classaitoolkit_1_1goap_1_1action.html | 18 +- classaitoolkit_1_1goap_1_1action.js | 6 + classaitoolkit_1_1goap_1_1plan-members.html | 8 +- classaitoolkit_1_1goap_1_1plan.html | 72 ++++- classaitoolkit_1_1goap_1_1plan.js | 7 + classes.html | 2 +- dir_01c01283de0638765a17d7763ea7cade.html | 2 + doxygen_crawl.html | 22 ++ fsm_8hpp_source.html | 261 ++++++++++++++++++ functions.html | 124 +++++++++ functions_func.html | 124 +++++++++ goap_8hpp_source.html | 244 ++++++++-------- group__fsm.html | 234 ++++++++++++++++ group__fsm.js | 16 ++ group__goap.html | 24 +- group__goap.js | 14 + hierarchy.html | 7 +- hierarchy.js | 5 +- index.html | 88 ++++-- menudata.js | 5 +- navtreedata.js | 22 +- navtreeindex0.js | 47 +++- search/all_0.js | 7 +- search/all_1.js | 2 +- search/all_10.js | 5 +- search/all_2.js | 4 +- search/all_3.js | 2 +- search/all_5.js | 2 +- search/all_6.js | 2 +- search/all_7.js | 4 +- search/all_8.js | 2 +- search/all_9.js | 2 +- search/all_b.js | 3 +- search/all_c.js | 7 +- search/all_d.js | 4 +- search/all_e.js | 13 +- search/all_f.js | 2 +- search/classes_5.js | 5 +- search/functions_0.js | 4 + search/functions_1.js | 5 + search/functions_2.js | 4 + search/functions_3.js | 7 + search/functions_4.js | 5 + search/functions_5.js | 5 + search/functions_6.js | 4 + search/groups_2.js | 2 +- search/groups_3.js | 2 +- search/groups_4.js | 2 +- search/groups_5.js | 2 +- search/groups_6.js | 4 + search/groups_7.js | 4 + search/groups_8.js | 4 + search/searchdata.js | 39 +-- search/typedefs_1.js | 4 + topics.html | 3 +- topics.js | 3 +- 67 files changed, 2121 insertions(+), 229 deletions(-) create mode 100644 classaitoolkit_1_1fsm_1_1simple__machine-members.html create mode 100644 classaitoolkit_1_1fsm_1_1simple__machine.html create mode 100644 classaitoolkit_1_1fsm_1_1simple__machine.js create mode 100644 classaitoolkit_1_1fsm_1_1stack__machine-members.html create mode 100644 classaitoolkit_1_1fsm_1_1stack__machine.html create mode 100644 classaitoolkit_1_1fsm_1_1stack__machine.js create mode 100644 classaitoolkit_1_1fsm_1_1state-members.html create mode 100644 classaitoolkit_1_1fsm_1_1state.html create mode 100644 classaitoolkit_1_1goap_1_1action.js create mode 100644 classaitoolkit_1_1goap_1_1plan.js create mode 100644 fsm_8hpp_source.html create mode 100644 functions.html create mode 100644 functions_func.html create mode 100644 group__fsm.html create mode 100644 group__fsm.js create mode 100644 group__goap.js create mode 100644 search/functions_0.js create mode 100644 search/functions_1.js create mode 100644 search/functions_2.js create mode 100644 search/functions_3.js create mode 100644 search/functions_4.js create mode 100644 search/functions_5.js create mode 100644 search/functions_6.js create mode 100644 search/groups_6.js create mode 100644 search/groups_7.js create mode 100644 search/groups_8.js create mode 100644 search/typedefs_1.js diff --git a/annotated.html b/annotated.html index 440f44a..19e18fd 100644 --- a/annotated.html +++ b/annotated.html @@ -110,12 +110,16 @@  CselSelector node, will execute all children in order until one succeeds  CseqSequence node, will execute all children in order until one fails  CtaskTask node, will execute the callback and return the result - Ngoap - Caction - Cplan - Nutility - Caction - Cevaluator + Nfsm + Csimple_machineA simple FSM + Cstack_machineA stack FSM + CstateA state of the FSM + Ngoap + CactionAn action that can be performed on a blackboard + CplanA plan is a sequence of actions that will lead to a goal state + Nutility + Caction + Cevaluator diff --git a/annotated_dup.js b/annotated_dup.js index 2ddf6a2..cd16aee 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -9,9 +9,14 @@ var annotated_dup = [ "seq", "classaitoolkit_1_1bt_1_1seq.html", null ], [ "task", "classaitoolkit_1_1bt_1_1task.html", null ] ] ], + [ "fsm", null, [ + [ "simple_machine", "classaitoolkit_1_1fsm_1_1simple__machine.html", "classaitoolkit_1_1fsm_1_1simple__machine" ], + [ "stack_machine", "classaitoolkit_1_1fsm_1_1stack__machine.html", "classaitoolkit_1_1fsm_1_1stack__machine" ], + [ "state", "classaitoolkit_1_1fsm_1_1state.html", null ] + ] ], [ "goap", null, [ - [ "action", "classaitoolkit_1_1goap_1_1action.html", null ], - [ "plan", "classaitoolkit_1_1goap_1_1plan.html", null ] + [ "action", "classaitoolkit_1_1goap_1_1action.html", "classaitoolkit_1_1goap_1_1action" ], + [ "plan", "classaitoolkit_1_1goap_1_1plan.html", "classaitoolkit_1_1goap_1_1plan" ] ] ], [ "utility", null, [ [ "action", "classaitoolkit_1_1utility_1_1action.html", null ], diff --git a/classaitoolkit_1_1fsm_1_1simple__machine-members.html b/classaitoolkit_1_1fsm_1_1simple__machine-members.html new file mode 100644 index 0000000..8f5fde9 --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1simple__machine-members.html @@ -0,0 +1,119 @@ + + + + + + + + +AI Toolkit: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
aitoolkit::fsm::simple_machine< T > Member List
+
+
+ +

This is the complete list of members for aitoolkit::fsm::simple_machine< T >, including all inherited members.

+ + + + + +
pause(T &blackboard)aitoolkit::fsm::simple_machine< T >inline
resume(T &blackboard)aitoolkit::fsm::simple_machine< T >inline
set_state(state_ptr< T > state, T &blackboard)aitoolkit::fsm::simple_machine< T >inline
update(T &blackboard)aitoolkit::fsm::simple_machine< T >inline
+
+ + + + diff --git a/classaitoolkit_1_1fsm_1_1simple__machine.html b/classaitoolkit_1_1fsm_1_1simple__machine.html new file mode 100644 index 0000000..bf14bfa --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1simple__machine.html @@ -0,0 +1,144 @@ + + + + + + + + +AI Toolkit: aitoolkit::fsm::simple_machine< T > Class Template Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
aitoolkit::fsm::simple_machine< T > Class Template Reference
+
+
+ +

A simple FSM. + More...

+ +

#include <fsm.hpp>

+ + + + + + + + + + + + + + +

+Public Member Functions

+void set_state (state_ptr< T > state, T &blackboard)
 Enters in a new state, exiting the previous one (if any).
 
+void pause (T &blackboard)
 Pause the machine.
 
+void resume (T &blackboard)
 Resume the machine.
 
+void update (T &blackboard)
 Update the machine.
 
+

Detailed Description

+
template<typename T>
+class aitoolkit::fsm::simple_machine< T >

A simple FSM.

+
+
+ + + + diff --git a/classaitoolkit_1_1fsm_1_1simple__machine.js b/classaitoolkit_1_1fsm_1_1simple__machine.js new file mode 100644 index 0000000..f16bd17 --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1simple__machine.js @@ -0,0 +1,7 @@ +var classaitoolkit_1_1fsm_1_1simple__machine = +[ + [ "pause", "classaitoolkit_1_1fsm_1_1simple__machine.html#aa600c93059ddf6dce545fc42046d047b", null ], + [ "resume", "classaitoolkit_1_1fsm_1_1simple__machine.html#a531f5909365e82b357cde5540e5fd8f5", null ], + [ "set_state", "classaitoolkit_1_1fsm_1_1simple__machine.html#ac20ac10d51e7c44df2755f713005ad08", null ], + [ "update", "classaitoolkit_1_1fsm_1_1simple__machine.html#a4ddaae0f2f3540155c479a9ebf6e7db1", null ] +]; \ No newline at end of file diff --git a/classaitoolkit_1_1fsm_1_1stack__machine-members.html b/classaitoolkit_1_1fsm_1_1stack__machine-members.html new file mode 100644 index 0000000..f5ae8c7 --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1stack__machine-members.html @@ -0,0 +1,118 @@ + + + + + + + + +AI Toolkit: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
aitoolkit::fsm::stack_machine< T > Member List
+
+
+ +

This is the complete list of members for aitoolkit::fsm::stack_machine< T >, including all inherited members.

+ + + + +
pop_state(T &blackboard)aitoolkit::fsm::stack_machine< T >inline
push_state(state_ptr< T > state, T &blackboard)aitoolkit::fsm::stack_machine< T >inline
update(T &blackboard)aitoolkit::fsm::stack_machine< T >inline
+
+ + + + diff --git a/classaitoolkit_1_1fsm_1_1stack__machine.html b/classaitoolkit_1_1fsm_1_1stack__machine.html new file mode 100644 index 0000000..8ecfc9a --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1stack__machine.html @@ -0,0 +1,140 @@ + + + + + + + + +AI Toolkit: aitoolkit::fsm::stack_machine< T > Class Template Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
aitoolkit::fsm::stack_machine< T > Class Template Reference
+
+
+ +

A stack FSM. + More...

+ +

#include <fsm.hpp>

+ + + + + + + + + + + +

+Public Member Functions

+void push_state (state_ptr< T > state, T &blackboard)
 Enters in a new state, pausing the previous one (if any).
 
+void pop_state (T &blackboard)
 Exits the current state, resuming the previous one (if any).
 
+void update (T &blackboard)
 Update the machine.
 
+

Detailed Description

+
template<typename T>
+class aitoolkit::fsm::stack_machine< T >

A stack FSM.

+
+
+ + + + diff --git a/classaitoolkit_1_1fsm_1_1stack__machine.js b/classaitoolkit_1_1fsm_1_1stack__machine.js new file mode 100644 index 0000000..09e73c1 --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1stack__machine.js @@ -0,0 +1,6 @@ +var classaitoolkit_1_1fsm_1_1stack__machine = +[ + [ "pop_state", "classaitoolkit_1_1fsm_1_1stack__machine.html#a8195f9885827f9735cd7fbe5855f1f9b", null ], + [ "push_state", "classaitoolkit_1_1fsm_1_1stack__machine.html#a34a6b18d339bb8a07e20882f3f572050", null ], + [ "update", "classaitoolkit_1_1fsm_1_1stack__machine.html#ac294e0e771d7111d484aeaa0e21d842d", null ] +]; \ No newline at end of file diff --git a/classaitoolkit_1_1fsm_1_1state-members.html b/classaitoolkit_1_1fsm_1_1state-members.html new file mode 100644 index 0000000..1a8d28f --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1state-members.html @@ -0,0 +1,121 @@ + + + + + + + + +AI Toolkit: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
aitoolkit::fsm::state< T > Member List
+
+
+ +

This is the complete list of members for aitoolkit::fsm::state< T >, including all inherited members.

+ + + + + + + +
enter(T &blackboard) (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >inlinevirtual
exit(T &blackboard) (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >inlinevirtual
pause(T &blackboard) (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >inlinevirtual
resume(T &blackboard) (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >inlinevirtual
update(T &blackboard) (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >inlinevirtual
~state()=default (defined in aitoolkit::fsm::state< T >)aitoolkit::fsm::state< T >virtual
+
+ + + + diff --git a/classaitoolkit_1_1fsm_1_1state.html b/classaitoolkit_1_1fsm_1_1state.html new file mode 100644 index 0000000..3ce65b2 --- /dev/null +++ b/classaitoolkit_1_1fsm_1_1state.html @@ -0,0 +1,143 @@ + + + + + + + + +AI Toolkit: aitoolkit::fsm::state< T > Class Template Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
aitoolkit::fsm::state< T > Class Template Reference
+
+
+ +

A state of the FSM. + More...

+ +

#include <fsm.hpp>

+ + + + + + + + + + + + +

+Public Member Functions

+virtual void enter (T &blackboard)
 
+virtual void exit (T &blackboard)
 
+virtual void pause (T &blackboard)
 
+virtual void resume (T &blackboard)
 
+virtual void update (T &blackboard)
 
+

Detailed Description

+
template<typename T>
+class aitoolkit::fsm::state< T >

A state of the FSM.

+
+
+ + + + diff --git a/classaitoolkit_1_1goap_1_1action-members.html b/classaitoolkit_1_1goap_1_1action-members.html index 3e40cfb..2d6d5b1 100644 --- a/classaitoolkit_1_1goap_1_1action-members.html +++ b/classaitoolkit_1_1goap_1_1action-members.html @@ -103,9 +103,9 @@

This is the complete list of members for aitoolkit::goap::action< T >, including all inherited members.

- - - + + +
apply_effects(T &blackboard) const =0 (defined in aitoolkit::goap::action< T >)aitoolkit::goap::action< T >pure virtual
check_preconditions(const T &blackboard) const =0 (defined in aitoolkit::goap::action< T >)aitoolkit::goap::action< T >pure virtual
cost(const T &blackboard) const =0 (defined in aitoolkit::goap::action< T >)aitoolkit::goap::action< T >pure virtual
apply_effects(T &blackboard) const =0aitoolkit::goap::action< T >pure virtual
check_preconditions(const T &blackboard) const =0aitoolkit::goap::action< T >pure virtual
cost(const T &blackboard) const =0aitoolkit::goap::action< T >pure virtual
~action()=default (defined in aitoolkit::goap::action< T >)aitoolkit::goap::action< T >virtual
diff --git a/classaitoolkit_1_1goap_1_1action.html b/classaitoolkit_1_1goap_1_1action.html index 3d2179f..aa61752 100644 --- a/classaitoolkit_1_1goap_1_1action.html +++ b/classaitoolkit_1_1goap_1_1action.html @@ -100,23 +100,37 @@
Public Member Functions | List of all members
-
aitoolkit::goap::action< T > Class Template Referenceabstract
+
aitoolkit::goap::action< T > Class Template Referenceabstract
+ +

An action that can be performed on a blackboard. + More...

+ +

#include <goap.hpp>

+ + +

Public Member Functions

virtual float cost (const T &blackboard) const =0
 The cost of performing this action.
 
virtual bool check_preconditions (const T &blackboard) const =0
 Check if the preconditions for this action are met.
 
virtual void apply_effects (T &blackboard) const =0
 Apply the effects of this action to the blackboard.
 
-
+

Detailed Description

+
template<blackboard_trait T>
+class aitoolkit::goap::action< T >

An action that can be performed on a blackboard.

+

An action hae a cost, which is used during planning, if 2 actions have a similar effect, the one with the lowest cost will be chosen.

+

An action also has preconditions, which are used to determine if an action can be performed on a blackboard. If the preconditions are not met, the action will not be considered during planning.

+

Finally, an action has effects, which are applied to the blackboard when the action is performed.

+
diff --git a/classaitoolkit_1_1goap_1_1plan.html b/classaitoolkit_1_1goap_1_1plan.html index d1e0924..5cc770b 100644 --- a/classaitoolkit_1_1goap_1_1plan.html +++ b/classaitoolkit_1_1goap_1_1plan.html @@ -100,25 +100,91 @@
Public Member Functions | List of all members
-
aitoolkit::goap::plan< T > Class Template Reference
+
aitoolkit::goap::plan< T > Class Template Reference
+ +

A plan is a sequence of actions that will lead to a goal state. + More...

+ +

#include <goap.hpp>

- + + + + +

Public Member Functions

plan (std::vector< action_ptr< T > > actions, T initital_blackboard, T goal_blackboard, size_t max_iterations=0)
 plan (std::vector< action_ptr< T > > actions, T initital_blackboard, T goal_blackboard, size_t max_iterations=0)
 Create a plan.
 
size_t size () const
 Get the number of actions in the plan.
 
 operator bool () const
 Check if the plan is empty.
 
void run (T &blackboard)
 Run the plan on a blackboard.
 
+

Detailed Description

+
template<blackboard_trait T>
+class aitoolkit::goap::plan< T >

A plan is a sequence of actions that will lead to a goal state.

+

The plan is created by providing a list of actions, an initial blackboard state, and a goal blackboard state. The plan will then find a sequence of actions that will lead to the goal state.

+

The plan can then be run on a blackboard to mutate it.

+

Constructor & Destructor Documentation

+ +

◆ plan()

+ +
+
+
+template<blackboard_trait T>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
aitoolkit::goap::plan< T >::plan (std::vector< action_ptr< T > > actions,
T initital_blackboard,
T goal_blackboard,
size_t max_iterations = 0 )
+
+inline
+
+ +

Create a plan.

+
Parameters
+ + + + + +
actionsThe list of actions that can be performed.
initital_blackboardThe initial state of the blackboard.
goal_blackboardThe goal state of the blackboard.
max_iterationsThe maximum number of iterations to perform before giving up. If 0, the plan will run until it finds a solution.
+
+
+ +
+
diff --git a/classaitoolkit_1_1goap_1_1plan.js b/classaitoolkit_1_1goap_1_1plan.js new file mode 100644 index 0000000..e158188 --- /dev/null +++ b/classaitoolkit_1_1goap_1_1plan.js @@ -0,0 +1,7 @@ +var classaitoolkit_1_1goap_1_1plan = +[ + [ "plan", "classaitoolkit_1_1goap_1_1plan.html#a5073941d5bd12e3dd441551422a8ef15", null ], + [ "operator bool", "classaitoolkit_1_1goap_1_1plan.html#ae4034dd0edcbcf404517790c8605589f", null ], + [ "run", "classaitoolkit_1_1goap_1_1plan.html#a3aa3a32429080d9ed4e7175d4bc4b793", null ], + [ "size", "classaitoolkit_1_1goap_1_1plan.html#a27db2be9b0d74099c6d704d9b8cac4e3", null ] +]; \ No newline at end of file diff --git a/classes.html b/classes.html index 54e75fc..120ec25 100644 --- a/classes.html +++ b/classes.html @@ -119,7 +119,7 @@
plan (aitoolkit::goap)
S
-
sel (aitoolkit::bt)
seq (aitoolkit::bt)
+
sel (aitoolkit::bt)
seq (aitoolkit::bt)
simple_machine (aitoolkit::fsm)
stack_machine (aitoolkit::fsm)
state (aitoolkit::fsm)
T
task (aitoolkit::bt)
diff --git a/dir_01c01283de0638765a17d7763ea7cade.html b/dir_01c01283de0638765a17d7763ea7cade.html index 17d445e..30b06c1 100644 --- a/dir_01c01283de0638765a17d7763ea7cade.html +++ b/dir_01c01283de0638765a17d7763ea7cade.html @@ -105,6 +105,8 @@ Files  behtree.hpp   + fsm.hpp goap.hpp    utility.hpp diff --git a/doxygen_crawl.html b/doxygen_crawl.html index 13bf973..94f2d37 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -9,9 +9,11 @@ + + @@ -25,6 +27,12 @@ + + + + + + @@ -43,5 +51,19 @@ + + + + + + + + + + + + + + diff --git a/fsm_8hpp_source.html b/fsm_8hpp_source.html new file mode 100644 index 0000000..531a238 --- /dev/null +++ b/fsm_8hpp_source.html @@ -0,0 +1,261 @@ + + + + + + + + +AI Toolkit: /home/runner/work/aitoolkit/aitoolkit/include/aitoolkit/fsm.hpp Source File + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fsm.hpp
+
+
+
1#pragma once
+
2
+
156#include <memory>
+
157#include <vector>
+
158
+
159namespace aitoolkit::fsm {
+
165 template <typename T>
+
+
166 class state {
+
167 public:
+
168 virtual ~state() = default;
+
169
+
170 virtual void enter(T& blackboard) {};
+
171 virtual void exit(T& blackboard) {};
+
172
+
173 virtual void pause(T& blackboard) {};
+
174 virtual void resume(T& blackboard) {};
+
175
+
176 virtual void update(T& blackboard) {};
+
177 };
+
+
178
+
183 template <typename T>
+
184 using state_ptr = std::shared_ptr<state<T>>;
+
185
+
191 template <typename T>
+
+ +
193 public:
+
+
197 void set_state(state_ptr<T> state, T& blackboard) {
+
198 if (m_current_state) {
+
199 m_current_state->exit(blackboard);
+
200 }
+
201
+
202 m_current_state = state;
+
203
+
204 if (m_current_state) {
+
205 m_current_state->enter(blackboard);
+
206
+
207 if (m_paused) {
+
208 m_current_state->pause(blackboard);
+
209 }
+
210 }
+
211 }
+
+
212
+
+
216 void pause(T& blackboard) {
+
217 m_paused = true;
+
218
+
219 if (m_current_state) {
+
220 m_current_state->pause(blackboard);
+
221 }
+
222 }
+
+
223
+
+
227 void resume(T& blackboard) {
+
228 m_paused = false;
+
229
+
230 if (m_current_state) {
+
231 m_current_state->resume(blackboard);
+
232 }
+
233 }
+
+
234
+
+
238 void update(T& blackboard) {
+
239 if (m_paused) {
+
240 return;
+
241 }
+
242
+
243 if (m_current_state) {
+
244 m_current_state->update(blackboard);
+
245 }
+
246 }
+
+
247
+
248 private:
+
249 state_ptr<T> m_current_state{nullptr};
+
250 bool m_paused{false};
+
251 };
+
+
252
+
258 template <typename T>
+
+ +
260 public:
+
+
264 void push_state(state_ptr<T> state, T& blackboard) {
+
265 if (!m_state_stack.empty()) {
+
266 auto current_state = m_state_stack.back();
+
267 current_state->pause(blackboard);
+
268 }
+
269
+
270 if (state) {
+
271 state->enter(blackboard);
+
272 m_state_stack.push_back(state);
+
273 }
+
274 }
+
+
275
+
+
279 void pop_state(T& blackboard) {
+
280 if (!m_state_stack.empty()) {
+
281 auto current_state = m_state_stack.back();
+
282 current_state->exit(blackboard);
+
283 m_state_stack.pop_back();
+
284 }
+
285
+
286 if (!m_state_stack.empty()) {
+
287 auto current_state = m_state_stack.back();
+
288 current_state->resume(blackboard);
+
289 }
+
290 }
+
+
291
+
+
295 void update(T& blackboard) {
+
296 if (!m_state_stack.empty()) {
+
297 auto current_state = m_state_stack.back();
+
298 current_state->update(blackboard);
+
299 }
+
300 }
+
+
301
+
302 private:
+
303 std::vector<state_ptr<T>> m_state_stack;
+
304 };
+
+
305}
+
A simple FSM.
Definition fsm.hpp:192
+
void update(T &blackboard)
Update the machine.
Definition fsm.hpp:238
+
void resume(T &blackboard)
Resume the machine.
Definition fsm.hpp:227
+
void pause(T &blackboard)
Pause the machine.
Definition fsm.hpp:216
+
void set_state(state_ptr< T > state, T &blackboard)
Enters in a new state, exiting the previous one (if any).
Definition fsm.hpp:197
+
A stack FSM.
Definition fsm.hpp:259
+
void push_state(state_ptr< T > state, T &blackboard)
Enters in a new state, pausing the previous one (if any).
Definition fsm.hpp:264
+
void pop_state(T &blackboard)
Exits the current state, resuming the previous one (if any).
Definition fsm.hpp:279
+
void update(T &blackboard)
Update the machine.
Definition fsm.hpp:295
+
A state of the FSM.
Definition fsm.hpp:166
+
std::shared_ptr< state< T > > state_ptr
Heap-allocated pointer to a state.
Definition fsm.hpp:184
+
+
+ + + + diff --git a/functions.html b/functions.html new file mode 100644 index 0000000..538ab46 --- /dev/null +++ b/functions.html @@ -0,0 +1,124 @@ + + + + + + + + +AI Toolkit: Class Members + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+
+
+ + + + diff --git a/functions_func.html b/functions_func.html new file mode 100644 index 0000000..cf26585 --- /dev/null +++ b/functions_func.html @@ -0,0 +1,124 @@ + + + + + + + + +AI Toolkit: Class Members - Functions + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions with links to the class documentation for each member:
+
+
+ + + + diff --git a/goap_8hpp_source.html b/goap_8hpp_source.html index 62c4c0c..b4da366 100644 --- a/goap_8hpp_source.html +++ b/goap_8hpp_source.html @@ -124,123 +124,139 @@
171 };
172
-
173 template <blackboard_trait T>
-
-
174 class action {
-
175 public:
-
176 virtual ~action() = default;
-
177
-
178 virtual float cost(const T& blackboard) const = 0;
-
179 virtual bool check_preconditions(const T& blackboard) const = 0;
-
180 virtual void apply_effects(T& blackboard) const = 0;
-
181 };
-
-
182
-
183 template <blackboard_trait T>
-
184 using action_ptr = std::shared_ptr<action<T>>;
-
185
-
186 template <blackboard_trait T>
-
-
187 class plan {
-
188 public:
-
189 plan(
-
190 std::vector<action_ptr<T>> actions,
-
191 T initital_blackboard,
-
192 T goal_blackboard,
-
193 size_t max_iterations = 0
-
194 ) {
-
195 struct node_type {
-
196 T blackboard;
-
197 float cost;
-
198
-
199 action_ptr<T> action_taken;
-
200 std::shared_ptr<node_type> parent;
-
201 };
+
188 template <blackboard_trait T>
+
+
189 class action {
+
190 public:
+
191 virtual ~action() = default;
+
192
+
196 virtual float cost(const T& blackboard) const = 0;
+
197
+
201 virtual bool check_preconditions(const T& blackboard) const = 0;
202
-
203 using node_ptr = std::shared_ptr<node_type>;
-
204
-
205 struct node_compare {
-
206 bool operator()(const node_ptr& a, const node_ptr& b) const {
-
207 return a->cost > b->cost;
-
208 }
-
209 };
-
210
-
211 std::priority_queue<node_ptr, std::vector<node_ptr>, node_compare> open_set;
-
212 std::unordered_set<T> closed_set;
-
213
-
214 open_set.push(std::make_shared<node_type>(node_type{
-
215 .blackboard = initital_blackboard,
-
216 .cost = 0.0f,
-
217 .action_taken = nullptr,
-
218 .parent = nullptr
-
219 }));
-
220
-
221 for (
-
222 size_t iteration = 0;
-
223 !open_set.empty() && (max_iterations == 0 || iteration < max_iterations);
-
224 ++iteration
-
225 ) {
-
226 auto current_node = open_set.top();
-
227 open_set.pop();
-
228
-
229 if (current_node->blackboard == goal_blackboard) {
-
230 while (current_node->parent != nullptr) {
-
231 m_actions.push(current_node->action_taken);
-
232 current_node = current_node->parent;
-
233 }
-
234
-
235 break;
-
236 }
-
237
-
238 if (!closed_set.contains(current_node->blackboard)) {
-
239 closed_set.insert(current_node->blackboard);
-
240
-
241 for (auto& action : actions) {
-
242 if (action->check_preconditions(current_node->blackboard)) {
-
243 auto next_blackboard = current_node->blackboard;
-
244 action->apply_effects(next_blackboard);
-
245 auto next_cost = current_node->cost + action->cost(current_node->blackboard);
-
246
-
247 if (!closed_set.contains(next_blackboard)) {
-
248 open_set.push(std::make_shared<node_type>(node_type{
-
249 .blackboard = next_blackboard,
-
250 .cost = next_cost,
-
251 .action_taken = action,
-
252 .parent = current_node
-
253 }));
-
254 }
-
255 }
-
256 }
+
206 virtual void apply_effects(T& blackboard) const = 0;
+
207 };
+
+
208
+
212 template <blackboard_trait T>
+
213 using action_ptr = std::shared_ptr<action<T>>;
+
214
+
226 template <blackboard_trait T>
+
+
227 class plan {
+
228 public:
+
+ +
239 std::vector<action_ptr<T>> actions,
+
240 T initital_blackboard,
+
241 T goal_blackboard,
+
242 size_t max_iterations = 0
+
243 ) {
+
244 struct node_type {
+
245 T blackboard;
+
246 float cost;
+
247
+
248 action_ptr<T> action_taken;
+
249 std::shared_ptr<node_type> parent;
+
250 };
+
251
+
252 using node_ptr = std::shared_ptr<node_type>;
+
253
+
254 struct node_compare {
+
255 bool operator()(const node_ptr& a, const node_ptr& b) const {
+
256 return a->cost > b->cost;
257 }
-
258 }
-
259 }
-
260
-
261 size_t size() const {
-
262 return m_actions.size();
-
263 }
-
264
-
265 operator bool() const {
-
266 return !m_actions.empty();
-
267 }
-
268
-
269 void run(T& blackboard) {
-
270 auto actions = m_actions;
-
271
-
272 while (!actions.empty()) {
-
273 auto action = actions.front();
-
274 actions.pop();
-
275
-
276 action->apply_effects(blackboard);
-
277 }
-
278 }
-
279
-
280 private:
-
281 std::queue<action_ptr<T>> m_actions;
-
282 };
+
258 };
+
259
+
260 std::priority_queue<node_ptr, std::vector<node_ptr>, node_compare> open_set;
+
261 std::unordered_set<T> closed_set;
+
262
+
263 open_set.push(std::make_shared<node_type>(node_type{
+
264 .blackboard = initital_blackboard,
+
265 .cost = 0.0f,
+
266 .action_taken = nullptr,
+
267 .parent = nullptr
+
268 }));
+
269
+
270 for (
+
271 size_t iteration = 0;
+
272 !open_set.empty() && (max_iterations == 0 || iteration < max_iterations);
+
273 ++iteration
+
274 ) {
+
275 auto current_node = open_set.top();
+
276 open_set.pop();
+
277
+
278 if (current_node->blackboard == goal_blackboard) {
+
279 while (current_node->parent != nullptr) {
+
280 m_actions.push(current_node->action_taken);
+
281 current_node = current_node->parent;
+
282 }
+
283
+
284 break;
+
285 }
+
286
+
287 if (!closed_set.contains(current_node->blackboard)) {
+
288 closed_set.insert(current_node->blackboard);
+
289
+
290 for (auto& action : actions) {
+
291 if (action->check_preconditions(current_node->blackboard)) {
+
292 auto next_blackboard = current_node->blackboard;
+
293 action->apply_effects(next_blackboard);
+
294 auto next_cost = current_node->cost + action->cost(current_node->blackboard);
+
295
+
296 if (!closed_set.contains(next_blackboard)) {
+
297 open_set.push(std::make_shared<node_type>(node_type{
+
298 .blackboard = next_blackboard,
+
299 .cost = next_cost,
+
300 .action_taken = action,
+
301 .parent = current_node
+
302 }));
+
303 }
+
304 }
+
305 }
+
306 }
+
307 }
+
308 }
+
+
309
+
+
313 size_t size() const {
+
314 return m_actions.size();
+
315 }
+
+
316
+
+
320 operator bool() const {
+
321 return !m_actions.empty();
+
322 }
+
+
323
+
+
327 void run(T& blackboard) {
+
328 auto actions = m_actions;
+
329
+
330 while (!actions.empty()) {
+
331 auto action = actions.front();
+
332 actions.pop();
+
333
+
334 action->apply_effects(blackboard);
+
335 }
+
336 }
+
+
337
+
338 private:
+
339 std::queue<action_ptr<T>> m_actions;
+
340 };
-
283}
-
Definition goap.hpp:174
-
Definition goap.hpp:187
+
341}
+
An action that can be performed on a blackboard.
Definition goap.hpp:189
+
virtual float cost(const T &blackboard) const =0
The cost of performing this action.
+
virtual void apply_effects(T &blackboard) const =0
Apply the effects of this action to the blackboard.
+
virtual bool check_preconditions(const T &blackboard) const =0
Check if the preconditions for this action are met.
+
A plan is a sequence of actions that will lead to a goal state.
Definition goap.hpp:227
+
size_t size() const
Get the number of actions in the plan.
Definition goap.hpp:313
+
void run(T &blackboard)
Run the plan on a blackboard.
Definition goap.hpp:327
+
plan(std::vector< action_ptr< T > > actions, T initital_blackboard, T goal_blackboard, size_t max_iterations=0)
Create a plan.
Definition goap.hpp:238
Definition goap.hpp:168
diff --git a/group__fsm.html b/group__fsm.html new file mode 100644 index 0000000..6bc7644 --- /dev/null +++ b/group__fsm.html @@ -0,0 +1,234 @@ + + + + + + + + +AI Toolkit: Finite State Machine + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
AI Toolkit v0.1.0 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
Finite State Machine
+
+
+ + + + + + + + + + + +

+Classes

class  aitoolkit::fsm::state< T >
 A state of the FSM. More...
 
class  aitoolkit::fsm::simple_machine< T >
 A simple FSM. More...
 
class  aitoolkit::fsm::stack_machine< T >
 A stack FSM. More...
 
+ + + + + +

+Typedefs

+template<typename T >
using aitoolkit::fsm::state_ptr = std::shared_ptr<state<T>>
 Heap-allocated pointer to a state.
 
+

Detailed Description

+

+Introduction

+

A finite state machine (FSM) is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some external inputs; the change from one state to another is called a transition.

+

This library provides 2 types of FSMs: a simple machiine and a stack machine. The simple machine is the simplest form of FSM, it can only be in one state at a time. The stack machine is a more complex form of FSM, it can be in multiple states at a time.

+

+Usage

+

First, include the header:

+
#include <aitoolkit/fsm.hpp>
+

Then, create a blackboard type:

+
struct blackboard_type {
+
// ...
+
};
+

Then, create a state type for each of your states:

+
class state_dummy final : public state<blackboard_type> {
+
public:
+
virtual void enter(blackboard_type& blackboard) override {
+
// ...
+
}
+
+
virtual void exit(blackboard_type& blackboard) override {
+
// ...
+
}
+
+
virtual void pause(blackboard_type& blackboard) override {
+
// ...
+
}
+
+
virtual void resume(blackboard_type& blackboard) override {
+
// ...
+
}
+
+
virtual void update(blackboard_type& blackboard) override {
+
// ...
+
}
+
};
+

+Simple state machine

+

Create an instance of the FSM:

+
using namespace aitoolkit::fsm;
+
+ +
A simple FSM.
Definition fsm.hpp:192
+

To transition to a new state, call set_state():

+
machine.set_state(std::make_shared<state_dummy>(), blackboard);
+
+

NB:

+
    +
  • this will call the exit method of the current state (if any) and the enter method of the new state
  • +
  • if the machine is paused while transitioning to a new state, the new state will be paused as well
  • +
+
+

To pause the machine, call pause():

+
machine.pause(blackboard);
+
+

NB: This will call the pause method of the current state (if any).

+
+

To resume the machine, call resume():

+
machine.resume(blackboard);
+
+

NB: This will call the resume method of the current state (if any).

+
+

To update the machine, call update():

+
machine.update(blackboard);
+
+

NB:

+
    +
  • this will call the update method of the current state (if any)
  • +
  • if the machine is paused, calling update() will do nothing
  • +
+
+

To clear any state, call set_state() with a nullptr:

+
machine.set_state(nullptr, blackboard);
+
+

NB: This will call the exit method of the current state (if any).

+
+

+Stack state machine

+

Create an instance of the FSM:

+
using namespace aitoolkit::fsm;
+
+ +
A stack FSM.
Definition fsm.hpp:259
+

To push a new state onto the stack, call push_state():

+
machine.push_state(std::make_shared<state_dummy>(), blackboard);
+
+

NB: This will call the pause method of the current state (if any) and the enter method of the new state.

+
+

To pop the top state off the stack, call pop_state():

+
machine.pop_state(blackboard);
+
+

NB: This will call the exit method of the current state (if any) and the resume method of the new top state (if any).

+
+

To update the machine, call update():

+
machine.update(blackboard);
+
+

NB: This will call the update method of the top state (if any).

+
+
+
+ + + + diff --git a/group__fsm.js b/group__fsm.js new file mode 100644 index 0000000..e6c5c6d --- /dev/null +++ b/group__fsm.js @@ -0,0 +1,16 @@ +var group__fsm = +[ + [ "aitoolkit::fsm::state< T >", "classaitoolkit_1_1fsm_1_1state.html", null ], + [ "aitoolkit::fsm::simple_machine< T >", "classaitoolkit_1_1fsm_1_1simple__machine.html", [ + [ "pause", "classaitoolkit_1_1fsm_1_1simple__machine.html#aa600c93059ddf6dce545fc42046d047b", null ], + [ "resume", "classaitoolkit_1_1fsm_1_1simple__machine.html#a531f5909365e82b357cde5540e5fd8f5", null ], + [ "set_state", "classaitoolkit_1_1fsm_1_1simple__machine.html#ac20ac10d51e7c44df2755f713005ad08", null ], + [ "update", "classaitoolkit_1_1fsm_1_1simple__machine.html#a4ddaae0f2f3540155c479a9ebf6e7db1", null ] + ] ], + [ "aitoolkit::fsm::stack_machine< T >", "classaitoolkit_1_1fsm_1_1stack__machine.html", [ + [ "pop_state", "classaitoolkit_1_1fsm_1_1stack__machine.html#a8195f9885827f9735cd7fbe5855f1f9b", null ], + [ "push_state", "classaitoolkit_1_1fsm_1_1stack__machine.html#a34a6b18d339bb8a07e20882f3f572050", null ], + [ "update", "classaitoolkit_1_1fsm_1_1stack__machine.html#ac294e0e771d7111d484aeaa0e21d842d", null ] + ] ], + [ "aitoolkit::fsm::state_ptr", "group__fsm.html#ga337249a3ecdc1c3c74985c6e177b27d9", null ] +]; \ No newline at end of file diff --git a/group__goap.html b/group__goap.html index dccda8d..8c212f5 100644 --- a/group__goap.html +++ b/group__goap.html @@ -97,10 +97,23 @@
+
Goal Oriented Action Planning
-

+ + + + + + + + +

+Classes

class  aitoolkit::goap::action< T >
 An action that can be performed on a blackboard. More...
 
class  aitoolkit::goap::plan< T >
 A plan is a sequence of actions that will lead to a goal state. More...
 
+

Detailed Description

+

Introduction

Goal Oriented Action Planning (GOAP) is a planning algorithm that can be used to find a sequence of actions that will lead to a goal state. The algorithm works by searching through a graph of possible actions and their effects. The algorithm is guaranteed to find a solution if one exists, but it is not guaranteed to find the optimal solution.

@@ -119,7 +132,7 @@ 

style start fill:darkred style goal fill:darkgreen -

+

Usage

First, include the header file:

#include <aitoolkit/goap.hpp>
@@ -208,7 +221,7 @@

blackboard.stone += 1;
}
};
-
Definition goap.hpp:174
+
An action that can be performed on a blackboard.
Definition goap.hpp:189

Finally, create a plan and run it:

auto actions = std::vector<action_ptr<blackboard_type>>{
std::make_shared<get_axe>(),
@@ -227,8 +240,9 @@

};
-
p.run(initial); // will mutate the blackboard
-
Definition goap.hpp:187
+
p.run(initial); // will mutate the blackboard
+
A plan is a sequence of actions that will lead to a goal state.
Definition goap.hpp:227
+
void run(T &blackboard)
Run the plan on a blackboard.
Definition goap.hpp:327

diff --git a/group__goap.js b/group__goap.js new file mode 100644 index 0000000..3bbb123 --- /dev/null +++ b/group__goap.js @@ -0,0 +1,14 @@ +var group__goap = +[ + [ "aitoolkit::goap::action< T >", "classaitoolkit_1_1goap_1_1action.html", [ + [ "apply_effects", "classaitoolkit_1_1goap_1_1action.html#a8ce9385653c46e068e99677a1d539dea", null ], + [ "check_preconditions", "classaitoolkit_1_1goap_1_1action.html#aafe509e1947d1100221752f3cb11020d", null ], + [ "cost", "classaitoolkit_1_1goap_1_1action.html#a1f76f484ef4fcee53fd1431ea66f9bfd", null ] + ] ], + [ "aitoolkit::goap::plan< T >", "classaitoolkit_1_1goap_1_1plan.html", [ + [ "plan", "classaitoolkit_1_1goap_1_1plan.html#a5073941d5bd12e3dd441551422a8ef15", null ], + [ "operator bool", "classaitoolkit_1_1goap_1_1plan.html#ae4034dd0edcbcf404517790c8605589f", null ], + [ "run", "classaitoolkit_1_1goap_1_1plan.html#a3aa3a32429080d9ed4e7175d4bc4b793", null ], + [ "size", "classaitoolkit_1_1goap_1_1plan.html#a27db2be9b0d74099c6d704d9b8cac4e3", null ] + ] ] +]; \ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html index 7363517..4812ac0 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -102,7 +102,7 @@
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12]
- + @@ -111,7 +111,10 @@ - + + + +
 Caitoolkit::goap::action< T >
 Caitoolkit::goap::action< T >An action that can be performed on a blackboard
 Caitoolkit::utility::action< T >
 Caitoolkit::utility::evaluator< T >
 Caitoolkit::bt::node< T >Base abstract class for all nodes
 Caitoolkit::bt::sel< T >Selector node, will execute all children in order until one succeeds
 Caitoolkit::bt::seq< T >Sequence node, will execute all children in order until one fails
 Caitoolkit::bt::task< T >Task node, will execute the callback and return the result
 Caitoolkit::goap::plan< T >
 Caitoolkit::goap::plan< T >A plan is a sequence of actions that will lead to a goal state
 Caitoolkit::fsm::simple_machine< T >A simple FSM
 Caitoolkit::fsm::stack_machine< T >A stack FSM
 Caitoolkit::fsm::state< T >A state of the FSM
diff --git a/hierarchy.js b/hierarchy.js index 11364f1..a666460 100644 --- a/hierarchy.js +++ b/hierarchy.js @@ -10,5 +10,8 @@ var hierarchy = [ "aitoolkit::bt::seq< T >", "classaitoolkit_1_1bt_1_1seq.html", null ], [ "aitoolkit::bt::task< T >", "classaitoolkit_1_1bt_1_1task.html", null ] ] ], - [ "aitoolkit::goap::plan< T >", "classaitoolkit_1_1goap_1_1plan.html", null ] + [ "aitoolkit::goap::plan< T >", "classaitoolkit_1_1goap_1_1plan.html", null ], + [ "aitoolkit::fsm::simple_machine< T >", "classaitoolkit_1_1fsm_1_1simple__machine.html", null ], + [ "aitoolkit::fsm::stack_machine< T >", "classaitoolkit_1_1fsm_1_1stack__machine.html", null ], + [ "aitoolkit::fsm::state< T >", "classaitoolkit_1_1fsm_1_1state.html", null ] ]; \ No newline at end of file diff --git a/index.html b/index.html index 56394e4..cea13a5 100644 --- a/index.html +++ b/index.html @@ -108,28 +108,81 @@
  • Utility AI
  • Goal Oriented Action Planning
  • -

    +

    Installation

    Add the include folder of this repository to your include paths.

    Or add it as a submodule:

    $ git submodule add https://github.com/linkdd/aitoolkit.git
    $ g++ -std=c++23 -Iaiotoolkit/include main.cpp -o mygame
    -

    +

    Usage

    -

    +

    Finite State Machine

    -

    TODO

    -

    +

    First, include the header:

    +
    #include <aitoolkit/fsm.hpp>
    +
    +
    using namespace aitoolkit::fsm;
    +

    Then, create your blackboard type:

    +
    struct blackboard_type {
    +
    // ...
    +
    };
    +

    Then, create a state type for each of your states:

    +
    class state_dummy final : public state<blackboard_type> {
    +
    public:
    +
    virtual void enter(blackboard_type& blackboard) override {
    +
    // ...
    +
    }
    +
    +
    virtual void exit(blackboard_type& blackboard) override {
    +
    // ...
    +
    }
    +
    +
    virtual void pause(blackboard_type& blackboard) override {
    +
    // ...
    +
    }
    +
    +
    virtual void resume(blackboard_type& blackboard) override {
    +
    // ...
    +
    }
    +
    +
    virtual void update(blackboard_type& blackboard) override {
    +
    // ...
    +
    }
    +
    };
    +
    A state of the FSM.
    Definition fsm.hpp:166
    +

    Create your simple state machine:

    +
    auto simple_bb = blackboard_type{};
    +
    auto simple_fsm = simple_machine<blackboard_type>();
    +
    +
    simple_fsm.set_state(std::make_shared<state_dummy>(), simple_bb);
    +
    simple_fsm.pause(simple_bb);
    +
    simple_fsm.resume(simple_bb);
    +
    simple_fsm.update(simple_bb);
    +
    A simple FSM.
    Definition fsm.hpp:192
    +

    Or with a stack state machine:

    +
    auto stack_bb = blackboard_type{};
    +
    auto stack_fsm = stack_machine<blackboard_type>{};
    +
    +
    stack_fsm.push_state(std::make_shared<state_dummy>(), stack_bb);
    +
    stack_fsm.push_state(std::make_shared<state_dummy>(), stack_bb);
    +
    +
    stack_fsm.update(stack_bb);
    +
    +
    stack_fsm.pop_state(stack_bb);
    +
    stack_fsm.pop_state(stack_bb);
    +
    A stack FSM.
    Definition fsm.hpp:259
    +
    void push_state(state_ptr< T > state, T &blackboard)
    Enters in a new state, pausing the previous one (if any).
    Definition fsm.hpp:264
    +

    Behavior Tree

    -

    Include the header:

    +

    First, include the header:

    #include <aitoolkit/behtree.hpp>
    using namespace aitoolkit::bt;
    -

    Create your blackboard type:

    +

    Then, create your blackboard type:

    struct blackboard_type {
    // ...
    };
    -

    Create your tree:

    +

    Then, create your tree:

    check<blackboard_type>::make([](const blackboard_type& bb) {
    // check some condition
    @@ -143,17 +196,17 @@

    Check node, will return success if the callback returns true.
    Definition behtree.hpp:266
    Sequence node, will execute all children in order until one fails.
    Definition behtree.hpp:171
    Task node, will execute the callback and return the result.
    Definition behtree.hpp:295
    -

    Evaluate it:

    +

    Finally, evaluate it:

    auto blackboard = blackboard_type{
    // ...
    };
    -
    auto state = tree->evaluate(blackboard);
    +
    auto state = tree->evaluate(blackboard);

    For more informations, consult the documentation.

    -

    +

    Utility AI

    TODO

    -

    +

    Goal Oriented Action Planning

    First, include the header file:

    #include <aitoolkit/goap.hpp>
    @@ -164,7 +217,7 @@

    bool has_axe{false};
    int wood{0};
    };
    -
    Definition goap.hpp:187
    +
    A plan is a sequence of actions that will lead to a goal state.
    Definition goap.hpp:227

    Next, create a class for each action that you want to be able to perform:

    class get_axe final : public action<blackboard_type> {
    public:
    @@ -195,7 +248,7 @@

    blackboard.wood += 1;
    }
    };
    -
    Definition goap.hpp:174
    +
    An action that can be performed on a blackboard.
    Definition goap.hpp:189

    Finally, create a plan and run it:

    auto actions = std::vector<action_ptr<blackboard_type>>{
    std::make_shared<get_axe>(),
    @@ -208,14 +261,15 @@

    };
    -
    p.run(initial); // will mutate the blackboard
    +
    p.run(initial); // will mutate the blackboard
    +
    void run(T &blackboard)
    Run the plan on a blackboard.
    Definition goap.hpp:327

    For more informations, consult the documentation.

    -

    +

    Documentation

    The documentation is available online here.

    You can build it locally using doxygen:

    $ make docs
    -

    +

    License

    This library is released under the terms of the MIT License.

    diff --git a/menudata.js b/menudata.js index ed1d097..a894e27 100644 --- a/menudata.js +++ b/menudata.js @@ -29,4 +29,7 @@ var menudata={children:[ {text:"Classes",url:"annotated.html",children:[ {text:"Class List",url:"annotated.html"}, {text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"hierarchy.html"}]}]} +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Functions",url:"functions_func.html"}]}]}]} diff --git a/navtreedata.js b/navtreedata.js index 1d3fde6..521d54f 100644 --- a/navtreedata.js +++ b/navtreedata.js @@ -25,21 +25,25 @@ var NAVTREE = [ [ "AI Toolkit", "index.html", [ - [ "Installation", "index.html#autotoc_md5", null ], - [ "Usage", "index.html#autotoc_md6", [ - [ "Finite State Machine", "index.html#autotoc_md7", null ], - [ "Behavior Tree", "index.html#autotoc_md8", null ], - [ "Utility AI", "index.html#autotoc_md9", null ], - [ "Goal Oriented Action Planning", "index.html#autotoc_md10", null ] + [ "Installation", "index.html#autotoc_md9", null ], + [ "Usage", "index.html#autotoc_md10", [ + [ "Finite State Machine", "index.html#autotoc_md11", null ], + [ "Behavior Tree", "index.html#autotoc_md12", null ], + [ "Utility AI", "index.html#autotoc_md13", null ], + [ "Goal Oriented Action Planning", "index.html#autotoc_md14", null ] ] ], - [ "Documentation", "index.html#autotoc_md11", null ], - [ "License", "index.html#autotoc_md12", null ], + [ "Documentation", "index.html#autotoc_md15", null ], + [ "License", "index.html#autotoc_md16", null ], [ "Topics", "topics.html", "topics" ], [ "Concepts", "concepts.html", "concepts" ], [ "Classes", "annotated.html", [ [ "Class List", "annotated.html", "annotated_dup" ], [ "Class Index", "classes.html", null ], - [ "Class Hierarchy", "hierarchy.html", "hierarchy" ] + [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], + [ "Class Members", "functions.html", [ + [ "All", "functions.html", null ], + [ "Functions", "functions_func.html", null ] + ] ] ] ] ] ] ]; diff --git a/navtreeindex0.js b/navtreeindex0.js index 12082fb..c1930d5 100644 --- a/navtreeindex0.js +++ b/navtreeindex0.js @@ -7,30 +7,51 @@ var NAVTREEINDEX0 = "classaitoolkit_1_1bt_1_1sel.html":[4,0,2], "classaitoolkit_1_1bt_1_1seq.html":[4,0,1], "classaitoolkit_1_1bt_1_1task.html":[4,0,5], -"classaitoolkit_1_1goap_1_1action.html":[6,0,0,1,0], -"classaitoolkit_1_1goap_1_1plan.html":[6,0,0,1,1], -"classaitoolkit_1_1utility_1_1action.html":[6,0,0,2,0], -"classaitoolkit_1_1utility_1_1evaluator.html":[6,0,0,2,1], +"classaitoolkit_1_1fsm_1_1simple__machine.html":[4,1,1], +"classaitoolkit_1_1fsm_1_1simple__machine.html#a4ddaae0f2f3540155c479a9ebf6e7db1":[4,1,1,3], +"classaitoolkit_1_1fsm_1_1simple__machine.html#a531f5909365e82b357cde5540e5fd8f5":[4,1,1,1], +"classaitoolkit_1_1fsm_1_1simple__machine.html#aa600c93059ddf6dce545fc42046d047b":[4,1,1,0], +"classaitoolkit_1_1fsm_1_1simple__machine.html#ac20ac10d51e7c44df2755f713005ad08":[4,1,1,2], +"classaitoolkit_1_1fsm_1_1stack__machine.html":[4,1,2], +"classaitoolkit_1_1fsm_1_1stack__machine.html#a34a6b18d339bb8a07e20882f3f572050":[4,1,2,1], +"classaitoolkit_1_1fsm_1_1stack__machine.html#a8195f9885827f9735cd7fbe5855f1f9b":[4,1,2,0], +"classaitoolkit_1_1fsm_1_1stack__machine.html#ac294e0e771d7111d484aeaa0e21d842d":[4,1,2,2], +"classaitoolkit_1_1fsm_1_1state.html":[4,1,0], +"classaitoolkit_1_1goap_1_1action.html":[4,2,0], +"classaitoolkit_1_1goap_1_1action.html#a1f76f484ef4fcee53fd1431ea66f9bfd":[4,2,0,2], +"classaitoolkit_1_1goap_1_1action.html#a8ce9385653c46e068e99677a1d539dea":[4,2,0,0], +"classaitoolkit_1_1goap_1_1action.html#aafe509e1947d1100221752f3cb11020d":[4,2,0,1], +"classaitoolkit_1_1goap_1_1plan.html":[4,2,1], +"classaitoolkit_1_1goap_1_1plan.html#a27db2be9b0d74099c6d704d9b8cac4e3":[4,2,1,3], +"classaitoolkit_1_1goap_1_1plan.html#a3aa3a32429080d9ed4e7175d4bc4b793":[4,2,1,2], +"classaitoolkit_1_1goap_1_1plan.html#a5073941d5bd12e3dd441551422a8ef15":[4,2,1,0], +"classaitoolkit_1_1goap_1_1plan.html#ae4034dd0edcbcf404517790c8605589f":[4,2,1,1], +"classaitoolkit_1_1utility_1_1action.html":[6,0,0,3,0], +"classaitoolkit_1_1utility_1_1evaluator.html":[6,0,0,3,1], "classes.html":[6,1], "conceptaitoolkit_1_1goap_1_1blackboard__trait.html":[5,0,0,0], "concepts.html":[5], +"functions.html":[6,3,0], +"functions_func.html":[6,3,1], "group__behtree.html":[4,0], "group__behtree.html#ga92d27070603784738ccfd4104852a377":[4,0,7], "group__behtree.html#gae1a27064841dad4d41e50c3e1a182400":[4,0,6], "group__behtree.html#gga92d27070603784738ccfd4104852a377a260ca9dd8a4577fc00b7bd5810298076":[4,0,7,0], "group__behtree.html#gga92d27070603784738ccfd4104852a377a3ee28fe1a60c95b89d29317f122c7021":[4,0,7,1], "group__behtree.html#gga92d27070603784738ccfd4104852a377a75101dcdfc88455bcafc9e53e0b06689":[4,0,7,2], -"group__goap.html":[4,1], +"group__fsm.html":[4,1], +"group__fsm.html#ga337249a3ecdc1c3c74985c6e177b27d9":[4,1,3], +"group__goap.html":[4,2], "hierarchy.html":[6,2], "index.html":[], -"index.html#autotoc_md10":[1,3], -"index.html#autotoc_md11":[2], -"index.html#autotoc_md12":[3], -"index.html#autotoc_md5":[0], -"index.html#autotoc_md6":[1], -"index.html#autotoc_md7":[1,0], -"index.html#autotoc_md8":[1,1], -"index.html#autotoc_md9":[1,2], +"index.html#autotoc_md10":[1], +"index.html#autotoc_md11":[1,0], +"index.html#autotoc_md12":[1,1], +"index.html#autotoc_md13":[1,2], +"index.html#autotoc_md14":[1,3], +"index.html#autotoc_md15":[2], +"index.html#autotoc_md16":[3], +"index.html#autotoc_md9":[0], "pages.html":[], "topics.html":[4] }; diff --git a/search/all_0.js b/search/all_0.js index 92806c0..578d555 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -1,8 +1,9 @@ var searchData= [ ['action_0',['action',['../classaitoolkit_1_1goap_1_1action.html',1,'aitoolkit::goap::action< T >'],['../classaitoolkit_1_1utility_1_1action.html',1,'aitoolkit::utility::action< T >']]], - ['action_20planning_1',['Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md10',1,'Goal Oriented Action Planning']]], - ['ai_2',['Utility AI',['../index.html#autotoc_md9',1,'']]], + ['action_20planning_1',['Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md14',1,'Goal Oriented Action Planning']]], + ['ai_2',['Utility AI',['../index.html#autotoc_md13',1,'']]], ['ai_20toolkit_3',['AI Toolkit',['../index.html',1,'']]], - ['aitoolkit_3a_3agoap_3a_3ablackboard_5ftrait_4',['blackboard_trait',['../conceptaitoolkit_1_1goap_1_1blackboard__trait.html',1,'aitoolkit::goap']]] + ['aitoolkit_3a_3agoap_3a_3ablackboard_5ftrait_4',['blackboard_trait',['../conceptaitoolkit_1_1goap_1_1blackboard__trait.html',1,'aitoolkit::goap']]], + ['apply_5feffects_5',['apply_effects',['../classaitoolkit_1_1goap_1_1action.html#a8ce9385653c46e068e99677a1d539dea',1,'aitoolkit::goap::action']]] ]; diff --git a/search/all_1.js b/search/all_1.js index d1aafa0..a97c81e 100644 --- a/search/all_1.js +++ b/search/all_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['behavior_20tree_0',['Behavior Tree',['../group__behtree.html',1,'Behavior Tree'],['../index.html#autotoc_md8',1,'Behavior Tree']]] + ['behavior_20tree_0',['Behavior Tree',['../group__behtree.html',1,'Behavior Tree'],['../index.html#autotoc_md12',1,'Behavior Tree']]] ]; diff --git a/search/all_10.js b/search/all_10.js index c64c4c4..9a166f4 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -1,5 +1,6 @@ var searchData= [ - ['usage_0',['Usage',['../group__behtree.html#autotoc_md1',1,'Usage'],['../group__goap.html#autotoc_md3',1,'Usage'],['../index.html#autotoc_md6',1,'Usage']]], - ['utility_20ai_1',['Utility AI',['../index.html#autotoc_md9',1,'']]] + ['update_0',['update',['../classaitoolkit_1_1fsm_1_1simple__machine.html#a4ddaae0f2f3540155c479a9ebf6e7db1',1,'aitoolkit::fsm::simple_machine::update()'],['../classaitoolkit_1_1fsm_1_1stack__machine.html#ac294e0e771d7111d484aeaa0e21d842d',1,'aitoolkit::fsm::stack_machine::update()']]], + ['usage_1',['Usage',['../group__behtree.html#autotoc_md1',1,'Usage'],['../group__fsm.html#autotoc_md3',1,'Usage'],['../group__goap.html#autotoc_md7',1,'Usage'],['../index.html#autotoc_md10',1,'Usage']]], + ['utility_20ai_2',['Utility AI',['../index.html#autotoc_md13',1,'']]] ]; diff --git a/search/all_2.js b/search/all_2.js index abadaf4..80470b8 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -1,4 +1,6 @@ var searchData= [ - ['check_0',['check',['../classaitoolkit_1_1bt_1_1check.html',1,'aitoolkit::bt']]] + ['check_0',['check',['../classaitoolkit_1_1bt_1_1check.html',1,'aitoolkit::bt']]], + ['check_5fpreconditions_1',['check_preconditions',['../classaitoolkit_1_1goap_1_1action.html#aafe509e1947d1100221752f3cb11020d',1,'aitoolkit::goap::action']]], + ['cost_2',['cost',['../classaitoolkit_1_1goap_1_1action.html#a1f76f484ef4fcee53fd1431ea66f9bfd',1,'aitoolkit::goap::action']]] ]; diff --git a/search/all_3.js b/search/all_3.js index e40cf16..696bde8 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['documentation_0',['Documentation',['../index.html#autotoc_md11',1,'']]] + ['documentation_0',['Documentation',['../index.html#autotoc_md15',1,'']]] ]; diff --git a/search/all_5.js b/search/all_5.js index def1097..effeca4 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,5 +1,5 @@ var searchData= [ ['failure_0',['failure',['../group__behtree.html#gga92d27070603784738ccfd4104852a377a3ee28fe1a60c95b89d29317f122c7021',1,'aitoolkit::bt']]], - ['finite_20state_20machine_1',['Finite State Machine',['../index.html#autotoc_md7',1,'']]] + ['finite_20state_20machine_1',['Finite State Machine',['../group__fsm.html',1,'Finite State Machine'],['../index.html#autotoc_md11',1,'Finite State Machine']]] ]; diff --git a/search/all_6.js b/search/all_6.js index e5100c6..231692d 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['goal_20oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md10',1,'Goal Oriented Action Planning']]] + ['goal_20oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md14',1,'Goal Oriented Action Planning']]] ]; diff --git a/search/all_7.js b/search/all_7.js index f2b2c26..961e2dc 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,5 +1,5 @@ var searchData= [ - ['installation_0',['Installation',['../index.html#autotoc_md5',1,'']]], - ['introduction_1',['Introduction',['../group__behtree.html#autotoc_md0',1,'Introduction'],['../group__goap.html#autotoc_md2',1,'Introduction']]] + ['installation_0',['Installation',['../index.html#autotoc_md9',1,'']]], + ['introduction_1',['Introduction',['../group__behtree.html#autotoc_md0',1,'Introduction'],['../group__fsm.html#autotoc_md2',1,'Introduction'],['../group__goap.html#autotoc_md6',1,'Introduction']]] ]; diff --git a/search/all_8.js b/search/all_8.js index 353eaf9..9490e97 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['license_0',['License',['../index.html#autotoc_md12',1,'']]] + ['license_0',['License',['../index.html#autotoc_md16',1,'']]] ]; diff --git a/search/all_9.js b/search/all_9.js index cc9184f..aeec78c 100644 --- a/search/all_9.js +++ b/search/all_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['machine_0',['Finite State Machine',['../index.html#autotoc_md7',1,'']]] + ['machine_0',['Machine',['../group__fsm.html',1,'Finite State Machine'],['../index.html#autotoc_md11',1,'Finite State Machine'],['../group__fsm.html#autotoc_md4',1,'Simple state machine'],['../group__fsm.html#autotoc_md5',1,'Stack state machine']]] ]; diff --git a/search/all_b.js b/search/all_b.js index 1d9fae5..e16b71f 100644 --- a/search/all_b.js +++ b/search/all_b.js @@ -1,4 +1,5 @@ var searchData= [ - ['oriented_20action_20planning_0',['Oriented Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md10',1,'Goal Oriented Action Planning']]] + ['operator_20bool_0',['operator bool',['../classaitoolkit_1_1goap_1_1plan.html#ae4034dd0edcbcf404517790c8605589f',1,'aitoolkit::goap::plan']]], + ['oriented_20action_20planning_1',['Oriented Action Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md14',1,'Goal Oriented Action Planning']]] ]; diff --git a/search/all_c.js b/search/all_c.js index c899f90..35b7c07 100644 --- a/search/all_c.js +++ b/search/all_c.js @@ -1,5 +1,8 @@ var searchData= [ - ['plan_0',['plan',['../classaitoolkit_1_1goap_1_1plan.html',1,'aitoolkit::goap']]], - ['planning_1',['Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md10',1,'Goal Oriented Action Planning']]] + ['pause_0',['pause',['../classaitoolkit_1_1fsm_1_1simple__machine.html#aa600c93059ddf6dce545fc42046d047b',1,'aitoolkit::fsm::simple_machine']]], + ['plan_1',['plan',['../classaitoolkit_1_1goap_1_1plan.html',1,'aitoolkit::goap::plan< T >'],['../classaitoolkit_1_1goap_1_1plan.html#a5073941d5bd12e3dd441551422a8ef15',1,'aitoolkit::goap::plan::plan()']]], + ['planning_2',['Planning',['../group__goap.html',1,'Goal Oriented Action Planning'],['../index.html#autotoc_md14',1,'Goal Oriented Action Planning']]], + ['pop_5fstate_3',['pop_state',['../classaitoolkit_1_1fsm_1_1stack__machine.html#a8195f9885827f9735cd7fbe5855f1f9b',1,'aitoolkit::fsm::stack_machine']]], + ['push_5fstate_4',['push_state',['../classaitoolkit_1_1fsm_1_1stack__machine.html#a34a6b18d339bb8a07e20882f3f572050',1,'aitoolkit::fsm::stack_machine']]] ]; diff --git a/search/all_d.js b/search/all_d.js index 432e070..7c38559 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -1,4 +1,6 @@ var searchData= [ - ['running_0',['running',['../group__behtree.html#gga92d27070603784738ccfd4104852a377a75101dcdfc88455bcafc9e53e0b06689',1,'aitoolkit::bt']]] + ['resume_0',['resume',['../classaitoolkit_1_1fsm_1_1simple__machine.html#a531f5909365e82b357cde5540e5fd8f5',1,'aitoolkit::fsm::simple_machine']]], + ['run_1',['run',['../classaitoolkit_1_1goap_1_1plan.html#a3aa3a32429080d9ed4e7175d4bc4b793',1,'aitoolkit::goap::plan']]], + ['running_2',['running',['../group__behtree.html#gga92d27070603784738ccfd4104852a377a75101dcdfc88455bcafc9e53e0b06689',1,'aitoolkit::bt']]] ]; diff --git a/search/all_e.js b/search/all_e.js index 703b38d..d5fc53e 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -2,6 +2,15 @@ var searchData= [ ['sel_0',['sel',['../classaitoolkit_1_1bt_1_1sel.html',1,'aitoolkit::bt']]], ['seq_1',['seq',['../classaitoolkit_1_1bt_1_1seq.html',1,'aitoolkit::bt']]], - ['state_20machine_2',['Finite State Machine',['../index.html#autotoc_md7',1,'']]], - ['success_3',['success',['../group__behtree.html#gga92d27070603784738ccfd4104852a377a260ca9dd8a4577fc00b7bd5810298076',1,'aitoolkit::bt']]] + ['set_5fstate_2',['set_state',['../classaitoolkit_1_1fsm_1_1simple__machine.html#ac20ac10d51e7c44df2755f713005ad08',1,'aitoolkit::fsm::simple_machine']]], + ['simple_20state_20machine_3',['Simple state machine',['../group__fsm.html#autotoc_md4',1,'']]], + ['simple_5fmachine_4',['simple_machine',['../classaitoolkit_1_1fsm_1_1simple__machine.html',1,'aitoolkit::fsm']]], + ['size_5',['size',['../classaitoolkit_1_1goap_1_1plan.html#a27db2be9b0d74099c6d704d9b8cac4e3',1,'aitoolkit::goap::plan']]], + ['stack_20state_20machine_6',['Stack state machine',['../group__fsm.html#autotoc_md5',1,'']]], + ['stack_5fmachine_7',['stack_machine',['../classaitoolkit_1_1fsm_1_1stack__machine.html',1,'aitoolkit::fsm']]], + ['state_8',['state',['../classaitoolkit_1_1fsm_1_1state.html',1,'aitoolkit::fsm']]], + ['state_20machine_9',['State Machine',['../group__fsm.html',1,'Finite State Machine'],['../index.html#autotoc_md11',1,'Finite State Machine']]], + ['state_20machine_10',['State machine',['../group__fsm.html#autotoc_md4',1,'Simple state machine'],['../group__fsm.html#autotoc_md5',1,'Stack state machine']]], + ['state_5fptr_11',['state_ptr',['../group__fsm.html#ga337249a3ecdc1c3c74985c6e177b27d9',1,'aitoolkit::fsm']]], + ['success_12',['success',['../group__behtree.html#gga92d27070603784738ccfd4104852a377a260ca9dd8a4577fc00b7bd5810298076',1,'aitoolkit::bt']]] ]; diff --git a/search/all_f.js b/search/all_f.js index 415ccba..a95ca1d 100644 --- a/search/all_f.js +++ b/search/all_f.js @@ -2,5 +2,5 @@ var searchData= [ ['task_0',['task',['../classaitoolkit_1_1bt_1_1task.html',1,'aitoolkit::bt']]], ['toolkit_1',['AI Toolkit',['../index.html',1,'']]], - ['tree_2',['Tree',['../group__behtree.html',1,'Behavior Tree'],['../index.html#autotoc_md8',1,'Behavior Tree']]] + ['tree_2',['Tree',['../group__behtree.html',1,'Behavior Tree'],['../index.html#autotoc_md12',1,'Behavior Tree']]] ]; diff --git a/search/classes_5.js b/search/classes_5.js index 7bdc220..a9603eb 100644 --- a/search/classes_5.js +++ b/search/classes_5.js @@ -1,5 +1,8 @@ var searchData= [ ['sel_0',['sel',['../classaitoolkit_1_1bt_1_1sel.html',1,'aitoolkit::bt']]], - ['seq_1',['seq',['../classaitoolkit_1_1bt_1_1seq.html',1,'aitoolkit::bt']]] + ['seq_1',['seq',['../classaitoolkit_1_1bt_1_1seq.html',1,'aitoolkit::bt']]], + ['simple_5fmachine_2',['simple_machine',['../classaitoolkit_1_1fsm_1_1simple__machine.html',1,'aitoolkit::fsm']]], + ['stack_5fmachine_3',['stack_machine',['../classaitoolkit_1_1fsm_1_1stack__machine.html',1,'aitoolkit::fsm']]], + ['state_4',['state',['../classaitoolkit_1_1fsm_1_1state.html',1,'aitoolkit::fsm']]] ]; diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 0000000..4caf8f9 --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['apply_5feffects_0',['apply_effects',['../classaitoolkit_1_1goap_1_1action.html#a8ce9385653c46e068e99677a1d539dea',1,'aitoolkit::goap::action']]] +]; diff --git a/search/functions_1.js b/search/functions_1.js new file mode 100644 index 0000000..58e9e95 --- /dev/null +++ b/search/functions_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['check_5fpreconditions_0',['check_preconditions',['../classaitoolkit_1_1goap_1_1action.html#aafe509e1947d1100221752f3cb11020d',1,'aitoolkit::goap::action']]], + ['cost_1',['cost',['../classaitoolkit_1_1goap_1_1action.html#a1f76f484ef4fcee53fd1431ea66f9bfd',1,'aitoolkit::goap::action']]] +]; diff --git a/search/functions_2.js b/search/functions_2.js new file mode 100644 index 0000000..e9d262a --- /dev/null +++ b/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_20bool_0',['operator bool',['../classaitoolkit_1_1goap_1_1plan.html#ae4034dd0edcbcf404517790c8605589f',1,'aitoolkit::goap::plan']]] +]; diff --git a/search/functions_3.js b/search/functions_3.js new file mode 100644 index 0000000..138e858 --- /dev/null +++ b/search/functions_3.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['pause_0',['pause',['../classaitoolkit_1_1fsm_1_1simple__machine.html#aa600c93059ddf6dce545fc42046d047b',1,'aitoolkit::fsm::simple_machine']]], + ['plan_1',['plan',['../classaitoolkit_1_1goap_1_1plan.html#a5073941d5bd12e3dd441551422a8ef15',1,'aitoolkit::goap::plan']]], + ['pop_5fstate_2',['pop_state',['../classaitoolkit_1_1fsm_1_1stack__machine.html#a8195f9885827f9735cd7fbe5855f1f9b',1,'aitoolkit::fsm::stack_machine']]], + ['push_5fstate_3',['push_state',['../classaitoolkit_1_1fsm_1_1stack__machine.html#a34a6b18d339bb8a07e20882f3f572050',1,'aitoolkit::fsm::stack_machine']]] +]; diff --git a/search/functions_4.js b/search/functions_4.js new file mode 100644 index 0000000..ffbf0a0 --- /dev/null +++ b/search/functions_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['resume_0',['resume',['../classaitoolkit_1_1fsm_1_1simple__machine.html#a531f5909365e82b357cde5540e5fd8f5',1,'aitoolkit::fsm::simple_machine']]], + ['run_1',['run',['../classaitoolkit_1_1goap_1_1plan.html#a3aa3a32429080d9ed4e7175d4bc4b793',1,'aitoolkit::goap::plan']]] +]; diff --git a/search/functions_5.js b/search/functions_5.js new file mode 100644 index 0000000..6507ae3 --- /dev/null +++ b/search/functions_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['set_5fstate_0',['set_state',['../classaitoolkit_1_1fsm_1_1simple__machine.html#ac20ac10d51e7c44df2755f713005ad08',1,'aitoolkit::fsm::simple_machine']]], + ['size_1',['size',['../classaitoolkit_1_1goap_1_1plan.html#a27db2be9b0d74099c6d704d9b8cac4e3',1,'aitoolkit::goap::plan']]] +]; diff --git a/search/functions_6.js b/search/functions_6.js new file mode 100644 index 0000000..a579e83 --- /dev/null +++ b/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['update_0',['update',['../classaitoolkit_1_1fsm_1_1simple__machine.html#a4ddaae0f2f3540155c479a9ebf6e7db1',1,'aitoolkit::fsm::simple_machine::update()'],['../classaitoolkit_1_1fsm_1_1stack__machine.html#ac294e0e771d7111d484aeaa0e21d842d',1,'aitoolkit::fsm::stack_machine::update()']]] +]; diff --git a/search/groups_2.js b/search/groups_2.js index e6b838e..bb2023f 100644 --- a/search/groups_2.js +++ b/search/groups_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['goal_20oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] + ['finite_20state_20machine_0',['Finite State Machine',['../group__fsm.html',1,'']]] ]; diff --git a/search/groups_3.js b/search/groups_3.js index 812922f..e6b838e 100644 --- a/search/groups_3.js +++ b/search/groups_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] + ['goal_20oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] ]; diff --git a/search/groups_4.js b/search/groups_4.js index 9478672..2ba4afa 100644 --- a/search/groups_4.js +++ b/search/groups_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] + ['machine_0',['Finite State Machine',['../group__fsm.html',1,'']]] ]; diff --git a/search/groups_5.js b/search/groups_5.js index ec6ed1a..812922f 100644 --- a/search/groups_5.js +++ b/search/groups_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['tree_0',['Behavior Tree',['../group__behtree.html',1,'']]] + ['oriented_20action_20planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] ]; diff --git a/search/groups_6.js b/search/groups_6.js new file mode 100644 index 0000000..9478672 --- /dev/null +++ b/search/groups_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['planning_0',['Goal Oriented Action Planning',['../group__goap.html',1,'']]] +]; diff --git a/search/groups_7.js b/search/groups_7.js new file mode 100644 index 0000000..6171616 --- /dev/null +++ b/search/groups_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['state_20machine_0',['Finite State Machine',['../group__fsm.html',1,'']]] +]; diff --git a/search/groups_8.js b/search/groups_8.js new file mode 100644 index 0000000..ec6ed1a --- /dev/null +++ b/search/groups_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tree_0',['Behavior Tree',['../group__behtree.html',1,'']]] +]; diff --git a/search/searchdata.js b/search/searchdata.js index 286aeb3..16d06ec 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -2,35 +2,38 @@ var indexSectionsWithContent = { 0: "abcdefgilmnoprstu", 1: "acenpst", - 2: "n", - 3: "e", - 4: "frs", - 5: "abgopt", - 6: "at", - 7: "a" + 2: "acoprsu", + 3: "ns", + 4: "e", + 5: "frs", + 6: "abfgmopst", + 7: "at", + 8: "a" }; var indexSectionNames = { 0: "all", 1: "classes", - 2: "typedefs", - 3: "enums", - 4: "enumvalues", - 5: "groups", - 6: "pages", - 7: "concepts" + 2: "functions", + 3: "typedefs", + 4: "enums", + 5: "enumvalues", + 6: "groups", + 7: "pages", + 8: "concepts" }; var indexSectionLabels = { 0: "All", 1: "Classes", - 2: "Typedefs", - 3: "Enumerations", - 4: "Enumerator", - 5: "Modules", - 6: "Pages", - 7: "Concepts" + 2: "Functions", + 3: "Typedefs", + 4: "Enumerations", + 5: "Enumerator", + 6: "Modules", + 7: "Pages", + 8: "Concepts" }; diff --git a/search/typedefs_1.js b/search/typedefs_1.js new file mode 100644 index 0000000..4d2a7fc --- /dev/null +++ b/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['state_5fptr_0',['state_ptr',['../group__fsm.html#ga337249a3ecdc1c3c74985c6e177b27d9',1,'aitoolkit::fsm']]] +]; diff --git a/topics.html b/topics.html index 4d537db..2632e31 100644 --- a/topics.html +++ b/topics.html @@ -103,7 +103,8 @@
    Here is a list of all topics with brief descriptions:
    - + +
     Behavior Tree
     Goal Oriented Action Planning
     Finite State Machine
     Goal Oriented Action Planning
    diff --git a/topics.js b/topics.js index bc0cf83..2ba5343 100644 --- a/topics.js +++ b/topics.js @@ -1,5 +1,6 @@ var topics = [ [ "Behavior Tree", "group__behtree.html", "group__behtree" ], - [ "Goal Oriented Action Planning", "group__goap.html", null ] + [ "Finite State Machine", "group__fsm.html", "group__fsm" ], + [ "Goal Oriented Action Planning", "group__goap.html", "group__goap" ] ]; \ No newline at end of file