A DownstairKid(NS-SHAFT) AI based on Deep Q-learning.
- wine
- Xvfb
- Pytorch
- main.py: Test the environment and make sure Xvfb works fine.
- train.py: Train the model.
- screenrecore.py Record the virtual screen.
- set the DISPLAY environment variable to the virtual screen display id first to recorder.
sudo pacman -S python wine xorg-server-xvfb xdotool
pip install -r requirements.txt
# According to your environment
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
python main.py
You should see an OpenCV imshow window
train.py
gamma = 0.99
batch_size = 64
replay_size = 1000
learning_rate = 1e-4
sync_target_frames = 20
replay_start_size = 1000
eps_start = 0.02
eps_decay = .999985
eps_min = 0.02
filename = "1220_s3" # Filename for best weights
python train.py