-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New feature: Override player input with machine learning models #17407
base: master
Are you sure you want to change the base?
Conversation
turn off GAME_AI feature by default
Seems like the CI checks failed. |
Fixed |
As far as I understand it requires a manually launching separate instance from https://github.com/MatPoliquin/stable-retro-scripts? This may not be very user-friendly. Maybe it makes sense to make it as a dynamic library or run/control the subprocess directly from RA? |
It's already a dynamic lib, only this part of the stable-retro-scripts repo is used with retroarch (ef_lib folder): The python scripts you see are used to train and test the models shipped with the lib |
Perhaps it makes sense to place it in |
Added the ef_lib folder (named it game_ai_lib) in deps |
Just saw your edit about online updater downloading the models... that would be very cool! |
ai/game_ai.cpp
Outdated
BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; | ||
|
||
hinstLib = LoadLibrary(TEXT("game_ai.dll")); | ||
assert(hinstLib); |
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.
retro_assert here and below
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.
Fixed
This PR adds support for overriding player 1 and/or 2 controller input with custom AI.
For example, NHL94 Sega Genesis community wants to be able to play against better AI, this feature address their needs.
The AI/machine learning part is in an external library so that way there is no need to update RA code base every time there is changes made to a game's AI, updates to pytorch, changes in model format, etc
Users can toggle on/off overriding input with the "Game AI" section in the quick menu.
This is an experimental feature at an early stage and should be turned off by default
Only works on Windows and Linux for now (x86), but eventually more platforms will be supported
Question:
This feature needs an external lib that I made + data (models/ram info). Where is best to put the build instructions for this?
https://github.com/MatPoliquin/stable-retro-scripts/tree/main/ef_lib