https://github.com/dcts/qwop-ai
Algorithm that learns to play QWOP game.
https://github.com/dcts/qwop-ai
Last synced: over 1 year ago
JSON representation
Algorithm that learns to play QWOP game.
- Host: GitHub
- URL: https://github.com/dcts/qwop-ai
- Owner: dcts
- Created: 2019-12-10T12:19:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-10T12:29:15.000Z (over 6 years ago)
- Last Synced: 2025-03-06T11:13:16.881Z (over 1 year ago)
- Language: Ruby
- Size: 291 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QWOP AI
Repo to make an algorithm learn how to play the [QWOP game](http://www.foddy.net/Athletics.html). Work in progress. The algorithm already accomplished to finish the run but its very slow and shitty.

### Evolution
Idea is to make an evolutionary algorithm
- a keypress pattern represents an individual of a population
- fitness function is the score/time
- random starting point -> mutation and reproduction to increase fitness
### Problems to solve
- [x] control the keyboard remotely (done in `ruby` with [selenium-webdriver gem](https://rubygems.org/gems/selenium-webdriver/versions/3.142.6))
- [ ] get game data (current score being the most important one)
- capture screenshot and use image processing to get text data
- copy game as described [here](https://github.com/qema/qwop-ai/issues/1)
- [ ] design gene structure (parameters modifyable by algorithm)
- length of pattern
- keypresses
- pause inbetween the keypresses
### Files
- **`run.rb`**: main file which runs the chrome webdriver and executes the keypresses
- **`screenshot.rb`**: snippet on how to make a screenshot (to capture score -> image processing?)
### Running the Script
you need to have installed **ruby** as well as **chrome webdriver**, **chrome browser** itself and the **selenium-webdriver** gem.