Code Monkey home page Code Monkey logo

hackmit-puzzle-2017-tinbot's Introduction

Tinbot

Where bots find their true love™

screenshot

Warning: This repository consists of server side secrets that are not in the .gitignore. Do not push from deployment sites.

Setup

Resolve dependencies,

pip install -r requirements.txt

The server will run with any Keras backend, but tensorflow is prefered for faster boot up time. The solution file only works with tensorflow.

We now need to generate and train the models we'll use. First edit the generate_models.py file. And set NUM_MODELS to the desired number of models to train. Then run,

python generate_models.py

Deploy

The repository has all client side dependencies pre-built and bundled. For local debugging, use,

python runserver.py

Production,

gunicorn -b 0.0.0.0:80 -w 1 tfb:app

You can only use 1 worker thread with gunicorn, because I suck at programming.

Puzzle Mechanics

(Spoiler Warning: Everything below this line gives away the solution to the puzzle)

The puzzle presents you with a website where you can edit your profile. The only thing you can change about your profile is your profile picture. When you do this, the site runs a neural network in your browser and on the server, predicting a specific class.

You can now start swiping bots on the Find Bots page. Your job is to get the Puzzler bot to swipe you back. The user should now notice that the preference of the Puzzler bot happens to only be class 1. This means that the user's profile picture must result in class 1 on the neural network.

The user at this point must implement a "gradient ascent" algorithm that maximizes the activation of the predicted class, solving for an input image that activates class 1.

Now the Puzzler bot will match with the user and a modal will show the actual puzzle answer.

Example Solution

There are many different ways of solving this puzzle. The one I could come up with is at tfb/trainer/solve.py

Development

The FIXME in the template tfb/templates/wrapper.html is part of the puzzle.

hackmit-puzzle-2017-tinbot's People

Contributors

patins avatar revalo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dzheng256

hackmit-puzzle-2017-tinbot's Issues

URL Scheme needs huyy

this is a joke (kinda) but if ur github username is api RIP
idrc ab that though

but i do care ab the api endpoints having the user as the last arg or not having them as an arg so we can proxy requests easily
(nginx-ingress and wildcards idk i didnt look into it enough but this feels easier)

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.