Code Monkey home page Code Monkey logo

qwop's Introduction

QWOP

Using a genetic algorithm to evolve a good qwopper.

Run

Local

Master

Grab the docker container from here via docker pull nathandemaria/qwop_master or build your own with docker build master/.

Run with docker run -d -v genealogy:/root/master/genealogy nathandemaria/qwop_master, or your own tag :)

Slave

From the directory containing docker-compose.xml, run docker-compose up -d --force-recreate. This will start two docker containers - a Selenium server running Firefox, and an R container running a listener that gets tasks from the QWOP master, plays a round of QWOP, grabs the score using Tesseract OCR, and sends it back. Look here for the definition of the R listener.

AWS

Master

I used the amzn-ami-2016.03.e-amazon-ecs-optimized image, with a t2.micro instance. Run the master docker container with docker run -d -p 5000:5000 -v genealogy:/root/master/genealogy nathandemaria/qwop_master:20160730, and use the Public IP as QWOP_MASTER_ROOT in the slave step. Make sure to open up port 5000, at least to the slave auto scaling group created below.

Slave

Create an ECS cluster, service, and task for QWOP. Thanks to Micah Hausler's container-transform docker container for translating my docker-compose.yaml to AWS's JSON format. See ecs-task.json for an example config (don't forget to replace <QWOP_MASTER_ROOT>). I attached an auto scaling group using the ECS optimized AMI (amzn-ami-2016.03.e-amazon-ecs-optimized), on t2.small instances.

qwop's People

Contributors

nathandemaria avatar

Watchers

James Cloos avatar WhyteB0x avatar  avatar

qwop's Issues

Make it cheaper

Currently, when I'm deploying this, it's on AWS with t2.small instances. That's fine, they're $0.026/hr now, but money can be saved. t2.small can't be used with spot instances, and t2.micro instances don't work (not enough RAM?).

I've also tried it with m3.medium, and that had a similar problem to t2.micro - each instance runs a few tasks, and then Selenium hangs when trying to take a screenshot. Sadness.

For reference: https://aws.amazon.com/ec2/pricing/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.