https://github.com/sunset1995/trex-game-agent
Designed course project for Scratch and Python @ NCTU
https://github.com/sunset1995/trex-game-agent
Last synced: 30 days ago
JSON representation
Designed course project for Scratch and Python @ NCTU
- Host: GitHub
- URL: https://github.com/sunset1995/trex-game-agent
- Owner: sunset1995
- License: mit
- Created: 2017-03-14T06:36:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T10:55:22.000Z (about 9 years ago)
- Last Synced: 2025-02-26T05:41:32.246Z (over 1 year ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trex-game-agent
Designed course project for Scratch and Python @ NCTU
Reading screenshot and controling keyboard to play trex game.
Here are some place to play this time-killing game:
- [T-Rex Runner](http://www.trex-game.skipser.com/)
- [Running T-Rex](http://apps.thecodepost.org/trex/trex.html)
- [T-Rex Game](https://scratch.mit.edu/projects/98506770/) on Scratch
This agent can only play well on [T-Rex Runner](http://www.trex-game.skipser.com/) version. To play other version, paramter should be tuned manually again.
This agent can play forever, barring accidents.
## Installation
Run `pip3 install -r requirements.txt` to install the dependencies.
Some extra effort may be needed in order to install [PIL](http://www.pythonware.com/products/pil/) and [pyautogui](https://pyautogui.readthedocs.io/en/latest/install.html) package.
## Let's Play
1. Open the game, make sure that the entire playground is visible.
2. Fire `python3 play.py`
After lossing the game, you should manually close the running `play.py` and restart it for next round if you want.