Closed oleg-derevenetz closed 3 months ago
looks like it's never going to happen
Never say never :) However, I think that if such a need arises, some general AI interface will be created once again according to real needs at that moment.
@oleg-derevenetz , thank you so much for these changes!
This PR contains no functional changes, just AI code simplification and refactoring.
In the
master
branch, for historical reasons, the AI code is organized in such a way that there is a rudimentary support for different AI implementations. I believe it looks redundant at the moment. All we have for now is a single AI implementation called "normal" and it does absolutely everything, therefore, in my opinion, there is no need for an extra layer, which just contains a bunch of methods that do literally nothing.With this PR:
AI::Base
->AI::Normal
) which do nothing useful but prevent the compiler from performing optimizations (e.g. code inlining during LTO);If in the future we suddenly still need to support various AI engines, it will be possible to make corresponding changes. But for now, the current AI code architecture looks like a bit of overengineering, hence this PR.