DanielSmith1239 / HQTriviaMaster

A neat little Mac program for answering HQ Trivia questions.
GNU General Public License v3.0
83 stars 22 forks source link

Probability Miscalculations? #77

Open ChrisSanford1 opened 6 years ago

ChrisSanford1 commented 6 years ago

I played the 9PM game on March 16th using HQ Trivia Master and its Web Socket with mixed results. I think it got about 6 out of 12 questions right. I've been keeping logs of each game to later analyze the questions it got wrong in hopes that I could pinpoint possible errors in its probability calculations. It came across false-positives in the following questions: 1) According to his own writings, how did St. Patrick first arrive in Ireland? 2) Which of these emperors' names translates in english to a small kind of footwear? 3) Which of these states does not currently have an in-n-out? 4) Which of these screenwriters once co-wrote the script for a flop snl film?

Using the same Google CSE, I did 3 separate queries using the same exact search strings used by HQTM for each question. For every question, the query with the correct answer had a sizable margin of difference from the others. For example, for the 1st question, the correct answer, Brought by pirates, returned many more results than the others. But for some reason, HQTM returned the following calculations:

Monastery messenger: 3 Brought by pirates: 4 Servant to a knight: 11 Predicted Correct Answer: Servant to a knight

As for the "Which of these" questions, the correct answer for question 2 had the lowest search results, and the correct answers for questions 3 and 4 had the highest search results.

With some probability calculations being so off despite my manual searches and observing that the correct answer returns a significantly high or low number of results, I'm not quite sure what's going on. I'm guessing it has a lot to do with how much weight it holds in search results vs parsing a page for options, but I'm not sure. I have my CSE just simply searching Google at the moment. I've attached the log from tonight's game.

March1620189PMLog.txt

jolbol1 commented 6 years ago

I don't have anything to add except I've experienced the same thing, Id assume its to do with how the script analyses the search results, and which method it uses.

I can get about 10/12 in most games nowadays but that's due to the fact I added in some code myself to open the 3 search queries in a browser tab, where I manually scan it myself for the answer (Hard to do in 10 seconds, But seems to work for most questions).

ChrisSanford1 commented 6 years ago

I'm glad I'm not the only one, and I had assumed the same. It'd be nice if there was a way to display a more detailed outline of its probabilities or be able to cycle through the different search methods manually.

I'm curious about the code you had entered yourself. I feel like that'd be a great option to add into preferences for users who would prefer having both the probability calculations and the browser tabs. Would you be willing to share this code? (My programming knowledge is severely limited and I've never touched Xcode/Swift before this project.)

DanielSmith1239 commented 6 years ago

I’ll try to look into this, but I have a lot going on right now. Meanwhile, anybody can feel free to contribute to the project if they have a solution.

ChrisSanford1 commented 6 years ago

You're doing great work, Daniel. I don't mean to add to your workload, just wanted to throw some ideas out there. Having fun playing around with the project 👍

jolbol1 commented 6 years ago

@MxQuid I'd be happy to share the code with you when I get back on my Mac,

burp61 commented 6 years ago

Please jolbol1

Coru89 commented 6 years ago

First, I want to give props to the dev. I've had fun playing with this solution. Thanks for your work.

I too have had a similar experience as MxQuid. The "which of these" questions are problematic. I am curious about the browser tabs enhancement. I think the option to scan would be useful for questions like these. @jolbol1 would you mind sharing your code with me as well?

jolbol1 commented 6 years ago

@Coru89 @burp61 @ChrisSanford1

Just uploaded my browser code to my GitHub fork: https://github.com/jolbol1/HQTriviaMaster

Here is a tutorial on how to use it: https://github.com/jolbol1/HQTriviaMaster/wiki/Browser-Mode

I changed 3 files, So either clone my one and start new or just download the following files and replace them with the existing ones: ViewController.swift, AnswerController.swift and Main.storyboard.

All should work well (It is on my end) Enjoy :)