Git Product home page Git Product logo

hqbot's Introduction

HQbot

HQbot is a bot that attempts to retrieve the best answer to a given trivia question from the live HQ Trivia game show.

Details

The script utilizes Pytesseract to perform OCR on live screenshots of HQ trivia. The script continually runs until it recognizes a question in the screenshot, at which point it seeds three types of search heuristics to Google. The results of these searches are parsed and weighted, and used in conjunction with word saliency estimates from Google's NLP API. The script then returns the best of the three answers according to the above metrics.

Pipeline

  1. The script takes a screenshot of the player's phone while HQTrivia is live
  2. The image is passed to Pytesseract OCR to recognize text in the image
  3. If the text is recognized as the proper question answer format, it moves to step 4, else back to step 1
  4. The question and three answers are parsed and used to stage a variety of search heuristics
  5. The searches are sent to Google and raw HTML is returned
  6. BeautifulSoup is used to strip out relevant information from the search results
  7. These results are analyzed and weighted according to the search heuristic
  8. The search results are combined with word saliency estimates from Google's NLP API to better refine predictions
  9. The best answer is determined and displayed to the user via the terminal

This process takes ~4 seconds to complete, leaving a few seconds to tap the answer on the screen.

Usage

hqbot's People

Contributors

samgriesemer avatar

Watchers

 avatar

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.