I am keeping upgrading this, so the code may change everyday.
requirments.txt./hollow_knight_Data/, and then copy the mod file to the game folder)/save_file/user3.dat into save folder (usually C:\user\_username_\AppData\LocalLow\Team Cherry\Hollow Knight)PossMassage() in win32 API, but it did not work well.
If you have any idea about sending keyboard event in the background, please let me know)F1 to start trainning. (Also you can use F1 to stop trainning)train.pyAgent.py gets output actions from our modelDQN.py is the learning algorithmModel.py defines the model we useReplayMemory.py defines the experience pool for learningtest.py is useless, I use it to test basic functions and fix bugs
Files in ./Tool are for other functions we may use
Actions defines actions for little knight and restart game scriptGetHp help us get our hp, boss hp, soul and location(it may have some bugs, you can fix it by yourself)SendKey is the API we use to send keyboard event to windows system.UserInput is an useless file, which I used it to train my model manually.WindowsAPI is used to get screenshot of the game, and key_check() is used to check which key is pressed.Helper defines [Reward Jugment] fucntion, and other functions we may useAdd delay reward of an action
Make the mdoel output an action sequence
Use two models to output actions. One is for moving and the other is for attack/jump/skill
Apply RESNET
Add LSTM layers
Merge a part of action model and move model
Remvoe LSTM layers
No more Q value, reward is enough, Q value is too complex to learn.
Use kernel32 to read player Hp and hornet Hp.
Use different criteria to evaluate move and actions.
Do not use skill without souls
Use more precise scoring standards
$ claude mcp add DQN_HollowKnight \
-- python -m otcore.mcp_server <graph>