This does a 'fit_sort' whenever the state is changed. fit_sort effectively sorts the actions by distance+cost so that the cost is actually present unlike the original algorithm.
This commit is contained in:
parent
c014e65c13
commit
c1aba2d5c8
5 changed files with 30 additions and 27 deletions
2
ai.hpp
2
ai.hpp
|
@ -23,7 +23,7 @@ namespace ai {
|
|||
EntityAI() {};
|
||||
|
||||
bool wants_to(std::string name);
|
||||
ai::Action& best_fit();
|
||||
void fit_sort();
|
||||
|
||||
bool active();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue