http://www.trex-game.skipser.com
pip install -r requirements.txt
Recommended to use Tensorflow-GPU as backend
-
Edit screen capture config in collect_data.py Line 9
-
run collect_data.py as root (require root by keybaord package)
This game use 3 keys on keyboard to record screen capture, the screen capture image will store in ./img/ folder. The image capture resolution is 650x130 pixel
Key | Description |
---|---|
Up Arrow (↑) | T-Rex Jump |
Down Arrow (↓) | T-Rex Crouch |
Right Arrow (→) | T-Rex ran normal |
if you want to exit collect_data.py press esc key.
Please check your screen capture correction in the folder ./img/ before go to next step
Example image captured
Just run train.py
python train.py
train until 98%+ accuracy. the weight file trex_weight.h5 will create.
run player.py as root (require root by keybaord package)
python player.py
It possible T-Rex will jump before barrier, you can modify delay in player.py
Available soon
Feel free to contribute on this project, I will be happy to work with you.
The MIT License (MIT)