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:
Zed A. Shaw 2025-04-03 10:14:50 -04:00
parent c014e65c13
commit c1aba2d5c8
5 changed files with 30 additions and 27 deletions

2
ai.hpp
View file

@ -23,7 +23,7 @@ namespace ai {
EntityAI() {};
bool wants_to(std::string name);
ai::Action& best_fit();
void fit_sort();
bool active();