HQ Trivia Bot — Why online game shows offering prize money are flawed
There’s an app called HQ Trivia. Up to 2 times a day, a live stream starts at a specified time. A presenter reads out 12 questions one-by-one to everyone watching the stream. Players have just 10 seconds to answer each question and anyone who manages to answer all 12 questions splits the prize between the winners.
What do the winners get? That changes every day. Prizes range from $500 — $18,000. There’s a way to win this money every time.
Just using your knowledge would be extremely difficult — most people can’t answer the questions “Who did Wilt Chamberlain say was the greatest basketball player ever?” or “Who forgot to pay the renewal fee on Passport.com resulting in a global shutdown?” let alone 12 of them.
Googling the answer by hand is extremely difficult. The time it takes for the presenter to read the question is included in the 10 seconds. Then you have to understand the question, type in the correct keywords, wait for the page to load, try to read the answers and submit it quickly. Even if you could do this, questions like “what is NOT in x” or “who has done BOTH x and y” would throw you off. You would still get results containing the other answers so Googling here really isn’t any use.
I spent a day building a quick proof-of-concept bot that can answer the questions correctly that’s accurate most of the time. The game offers the ability to get +1 life every game by inviting friends too, so with this there’s a much higher chance to win the prize.
NOTE: This violates HQ Trivia’s Terms of Service if used in a live game. Therefore I have never used this during a live game and the above proof-of-concept demonstration is performed on a previous recorded game found on YouTube. I don’t condone the use of a bot in a live game.
You shall not (directly or indirectly): […] (v) use manual or automated software, devices, or other processes to “crawl” or “spider” any page of the App; (vi) harvest or scrape any Content from the Services;
Steps making this happen
- Plug the phone that’s playing the game into my MacBook and use QuickTime to have the screen appear live on the computer.
- Use Automator to run a script after taking a screenshot of the question and the 3 answers.
- Upload the screenshot to Google’s Vision API and use the Text Detection to read the question and the 3 answers.
- Use a Google Custom Search Engine API and enter in the question. You can also use Boolean Operators or quotes surrounding the answers at the end of the question.
- Scan the 9 results this API returns and give each answer a score based on how many times it occurs in the snippets.
- If the answer cannot be found in the snippets; load the websites one by one, search all of the text and give each answer an occurrence score.
All of this can be done in under 7 seconds, giving you some time to submit the answer on the app. Using better search techniques or multiple services to search the question and answers could yield better results than my bot. For example, you could be fancy and retrieve important words from Cloud Natural Language Processing on the question and see the occurrence count when Google’d with each answer.
I absolutely love the idea of this app. Everything is great, from the Artwork to the presenter. To prevent this, HQ Trivia needs to detect users who are recording the screen — similar to how Netflix deals with the situation.
Someone could spend longer developing a better bot, retrieving the answer faster and with more accuracy. It’s only a matter of time.
I’m also looking for 2018–2019 placements for Computer Science, please don’t hesitate to get in touch!