-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
AI code refactoring #8986
AI code refactoring #8986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (2/2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections about this. 4 years ago I hoped for a competing AI to pop up but 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.