Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 78
  1. #41
    Quote Originally Posted by brevity View Post
    Despite my handle, I can talk about Final Jeopardy! strategy forever. I don't think the contestants are necessarily bad at math or logic. They're just bad at wagering.





    I understand your motivation here, but your 2nd place strategy illustrates how the math/logic approach is sometimes deficient when it comes to ideal wagering. Ideally, the wager should be unilateral (without regard to what other contestants might bid), and aggressive enough to potentially win if you're right, but safe enough to minimize the damage in case you're wrong. There is also an element of regret and second-guessing that comes into play.

    LEADER before Final Jeopardy!

    If the leader wants to win, he or she is locked into a wager of at least $10,001. The lack of a choice here is probably a psychological benefit because if you lose, the level of second-guessing is kept to a minimum. (This is one reason why you want the lead at the end of Double Jeopardy!, no matter how small.)

    2ND PLACE before Final Jeopardy!

    The 2nd place contestant also wants to win, so I can't agree with the $0 wager. This is where math/logic diverges from wagering. You shouldn't make a bid in anticipation of another contestant's bid. (The leader doesn't bid $10,001 for the drama of potentially winning by one dollar, but because it is the bare minimum required to take the opposition out of the equation. It is an aggressive and selfish wager made with blinders on.) Same applies here. The 2nd place contestant needs to wager at least $5,001 to pull ahead of the leader and force the leader to win by also getting Final Jeopardy! right. This is also a psychologically beneficial bet that minimizes second-guessing.

    A final note: if you're the 2nd place contestant, to hell with the 3rd place contestant.

    3RD PLACE before Final Jeopardy!

    Ideal wagering may go out the window here. A lot depends on how distant in 3rd place this contestant is, and how close 1st and 2nd place are to each other. From a calculation perspective, this is the least simple position to be in. Also, much thought can go into a wager that is almost always rendered moot by the outcome. So you probably have to embrace the possible wagers of the 1st and 2nd place and accept math/logic as your guide. In the above example, $3,000 is probably the correct minimum bet. But it's specific to this situation. Creating general rules would require characterizing the pre-Final scores algebraically (A is less than 2 times B, and less than 3 times C), which looks tedious.

    There are obvious complications I left out (tie scores, a terrible Final category), but those are the basics.
    I really can't argue with the a $5,001 bet from second place. Betting $0 takes a leap of faith that first place won't be freaked about the category, assume everyone will get it wrong, bet $0 themselves, and hope (note: "Hope is not a strategy" -- but that doesn't preclude it from becoming a tactic).

    The one risk is that your world worsens if YOU get the wrong answer:

    If 1st and 3rd both answer correctly, you fall to 3rd place (big deal, you lose $1,000).
    If 1st and 3rd both answer incorrectly, you're now in a tie and get one more chance
    If 1st is wrong and 3rd is right, you handed the game to the third place person (which does happen sometimes).

    Also, like in ongoing business negotiations, taking a view of JUST THIS GAME can be detrimental to your long term success. Also, betting $5,001 keeps everyone honest in the future. If potential contestants see you win with a $5,001 bet instead of a $0 bet, they will be forced to bet when they play against you.

  2. #42
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Quote Originally Posted by cf-62 View Post
    The secondary purpose of Jeopardy is to win 2nd if you can't win 1st. The tertiary purpose is showing pride over being on the preeminent knowledge game show.
    ...
    Side note: the third-place $0 bet. Usually, the best bet from third place is simply $0 - but almost never made. It's like there's some sort of false sense of accomplishment they get from the chance to double their money. Honestly, nobody cares if you earned $11,000 or 5,500 from third place. You lost - plain and simple. Last night was a prime example of a completely misguided 3rd place bet. WHY???? WHY???? Why did she bet even $1? She could not catch either leader. Her only chance to WIN was for both to be incorrect, AND for second place to bet improperly. In fact, she gave $1,000 away (2nd place vs. 3rd place) by betting. She could have doubled her take home by NOT trying to double her score.
    Quote Originally Posted by brevity View Post
    3RD PLACE before Final Jeopardy!

    Ideal wagering may go out the window here. A lot depends on how distant in 3rd place this contestant is, and how close 1st and 2nd place are to each other. From a calculation perspective, this is the least simple position to be in. Also, much thought can go into a wager that is almost always rendered moot by the outcome. So you probably have to embrace the possible wagers of the 1st and 2nd place and accept math/logic as your guide. In the above example, $3,000 is probably the correct minimum bet. But it's specific to this situation. Creating general rules would require characterizing the pre-Final scores algebraically (A is less than 2 times B, and less than 3 times C), which looks tedious.
    I take a bit of a different view on 2nd/3rd place. To me, finishing 2nd means nothing. There is no difference in sense of accomplishment to me between 2nd and 3rd - you didn't win on Jeopardy! So they are interchangeable. Plus, as I mentioned before, the prize payouts are so puny that the money difference is not going to be a significant factor.

    Thus it does simplify my betting strategy slightly, because I'm not worried about scenarios that differentiate me between 2nd and 3rd.

    For example, in the above scenario (20/15/7), I would go all out in 3rd place (or maybe leave myself a couple bucks just to say I didn't finish with $0). I would go all out because this allows me to win in more scenarios - that is, more sub-optimal wagers by 2nd place.
    If I get it wrong, there's no way I'm winning anyway (unless 1st place is a crazy person... which actually I remember Alex Jacob doing multiple times - betting way more than needed to cover - but I'll assume they're just betting to cover). And if I get it right, I feel my chances of winning increase.


    Exceptions to this rule are when you can't double up above 2nd, and a bet to cover by 1st drops them below your score. Then maybe wager up to the difference between you and where 1st would end up on a miss. For example, [20/18/7] - bet up to $3,000. You have to hope 2nd bets big here, but hey - you're not in a great position so need some luck anyway!
    Last edited by snowdenscold; 10-16-2015 at 09:59 AM.

  3. #43
    Join Date
    Feb 2007
    Interesting -- thanks.

    I tried to setup a scenario where your strategy would fail, giving the first place player a strategy for winning even with a wrong answer. but you're right about the "lifetime of regret" line.

    I'm only a casual and infrequent Jeopardy watcher, but when I do watch the betting strategy for final jeopardy always fascinates me. I wonder what the % of right answers in FJ is? that surely has to factor into the thinking.

  4. #44
    Join Date
    Feb 2007
    Okay, looking at this website it looks like the % of correct answers in final jeopardy is ~49,44,36 for players in 1st, 2nd and 3rd going into FJ. Using those statistics*, I built a model to test some of the betting strategies:

    Here are the results:

    CF-62:
    A: 10,001
    B: 0
    C: 3,000

    Player A comes in first in 49% of the simulated games. Player B: 51%. Player A comes in 3rd a whopping 18% of the time, which would be devastating consider s/he had scored almost as much as the other two players combined.

    Brevity:
    A: 10,001
    B: 5,001
    C: 3,000

    Player A wins 67% of the time! Player B only wins 41% of the matches.

    Throwing a third player into the mix, the website above has a "wagering calculator":
    A: 10,000
    B: 5,000
    C: 6,999

    The results are essentially equal to Brevity's.

    The clear winning strategy for Player B here is CF-62's. Maybe if I have time later, I'll do a full stochastic model do try to find a better strategy. But it's interesting to me that Player B, with CF-62's strategy, is (slightly) favored to win.

    But if A knows B will employ CF-62's strategy, he can guarantee a win by betting less than 5,000. If A bets zero, and B bets 5,001 (like brevity suggests), A wins 57% of the games.

    So it seems to me the that the consensus "correct" strategy for player A is dead wrong.




    * there is a clear weakness in this approach: I am treating each of the 3 responses in the game as a separate random event, but I would imagine there is a strong correlation in responses: i.e. when player A's answer is correct, player B's percentage will be higher than 44%.

  5. #45
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Thank you for the analysis!

    Quote Originally Posted by gus View Post

    But if A knows B will employ CF-62's strategy, he can guarantee a win by betting less than 5,000. If A bets zero, and B bets 5,001 (like brevity suggests), A wins 57% of the games.

    So it seems to me the that the consensus "correct" strategy for player A is dead wrong.
    This gets to what I was saying earlier - do you try to "outwit" your 2nd place opponent, or can too much sneakiness backfire? I was debating the upside of a potential increased % chance to win with the downside of essentially taking the game out of your own hands and putting it your opponents.

    I was originally going down this path until cf-62 reminded me that you've just outplayed your opponents over 60 questions - why take it out of your hands now? That does seem to be a fairly compelling argument. But the flip-side is that the % of questions you correctly know for FJ is going to be lower (and I think your stats above back that up) than average game board questions, which comes down to buzzer timing. So not quite a fair comparison.

    * there is a clear weakness in this approach: I am treating each of the 3 responses in the game as a separate random event, but I would imagine there is a strong correlation in responses: i.e. when player A's answer is correct, player B's percentage will be higher than 44%.
    My first thought is to agree wholeheartedly, though I wonder if there's stats we can pull that show the breakdown among: all 3 get it right, 2, 1, and triple stumper. And if there is any way to associate the 1 and 2 "get it right" %'s w/ money position that'd be even better.

  6. #46
    Join Date
    Feb 2007
    Location
    Deeetroit City
    My strategy would be to choose SWords at every opportunity.

    I love weaponry.

    And yes, I can do a bad fake Scottish accent.

  7. #47
    Join Date
    Feb 2007
    Quote Originally Posted by snowdenscold View Post
    My first thought is to agree wholeheartedly, though I wonder if there's stats we can pull that show the breakdown among: all 3 get it right, 2, 1, and triple stumper. And if there is any way to associate the 1 and 2 "get it right" %'s w/ money position that'd be even better.
    Okay, there are 8 permutations when all three players make FJ, so that simplifies things dramatically, and the website I linked breaks down the number of times those 8 happen. If I didn't have actual work to do, I'd make the effort to aggregate all 31 seasons to make amore rigorous model.

  8. #48
    Join Date
    Feb 2007
    Location
    Asheville

    Kudos to our posters

    Only on DBR would such a discussion exist, and this is certainly not the first, nor will be the last, time.

    Now, if this could somehow be applied to the probability of whether a certain type of BBQ is superior to another, then we would really have something of real value.

    ricks

  9. #49
    Join Date
    Sep 2007
    Location
    Undisclosed
    Quote Originally Posted by ricks68 View Post
    Only on DBR would such a discussion exist, and this is certainly not the first, nor will be the last, time.

    Now, if this could somehow be applied to the probability of whether a certain type of BBQ is superior to another, then we would really have something of real value.

    ricks
    Well, the odds of bbq superiority is simple. The odds of good bbq with a vinegar sauce are greater than those with a tomato sauce, and the odds of bbg with mustard sauce being top of the heat is pretty darn slim.

  10. #50
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Quote Originally Posted by gus View Post
    Okay, there are 8 permutations when all three players make FJ, so that simplifies things dramatically, and the website I linked breaks down the number of times those 8 happen. If I didn't have actual work to do, I'd make the effort to aggregate all 31 seasons to make amore rigorous model.
    OK I started looking thru the site you linked earlier and it's indeed full of useful info!

    I suppose I could have done some scripting work (which I may still do if I can find a little more free time), but instead I manually pulled 5 seasons of results into Excel:

    (These are ordered in terms of money entering FJ and I'm assuming W = Wrong, R = Right... it didn't clarify on the website)

    Code:
    WWW	234	21%		1st correct	51%		
    WWR	98	9%		2nd correct	50%		
    WRW	118	11%		3rd correct	46%		
    WRR	85	8%					
    RWW	126	11%		1st correct when 2nd wrong			39%
    RWR	86	8%		2nd correct when 1st wrong			38%
    RRW	120	11%					
    RRR	231	21%		1st correct when 2nd correct			63%
    				2nd correct when 1st correct			62%
    	1098
    So yes, seems to be decently correlated...


    Another interesting set of data - here's how often 1st bets to cover (assumes there wasn't a runaway nor a tie):

    Code:
    Season	% of time bet to cover
    	
    22	86%
    23	88%
    24	86%
    25	89%
    26	86%
    27	91%
    28	90%
    29	82%
    30	80%
    31	79%
    What's hard to determine is how much of that 10-20% comes from strategy/philosophy and how much comes from category uncomfortability. I'd assume the latter is the biggest component.
    Last edited by snowdenscold; 10-16-2015 at 03:02 PM.

  11. #51
    Join Date
    Feb 2009
    Location
    Wilmington, NC
    Quote Originally Posted by OldPhiKap View Post
    Well, the odds of bbq superiority is simple. The odds of good bbq with a vinegar sauce are greater than those with a tomato sauce, and the odds of bbg with mustard sauce being top of the heat is pretty darn slim.
    This is actually true. I have years and years of hard data gathered to proove this analysis. It's stored around my waist line.

  12. #52
    Join Date
    Nov 2013
    Location
    The Northwest
    As a Seattle area resident, that final jeopardy question was amazingly easy and shocking that he lost on it, but I know my perspective is skewed on that one. He was super impressive in his run.

  13. #53

    Needling the (former) champ

    Quote Originally Posted by gurufrisbee View Post
    As a Seattle area resident, that final jeopardy question was amazingly easy and shocking that he lost on it, but I know my perspective is skewed on that one. He was super impressive in his run.
    It stumped me, but the "galaxy gold" was one serious hint.

    If ONLY I had remembered what I had in my boyhood stamp collection. . .


    k

  14. #54
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Quote Originally Posted by snowdenscold View Post
    OK I started looking thru the site you linked earlier and it's indeed full of useful info!

    I suppose I could have done some scripting work (which I may still do if I can find a little more free time), but instead I manually pulled 5 seasons of results into Excel:

    (These are ordered in terms of money entering FJ and I'm assuming W = Wrong, R = Right... it didn't clarify on the website)

    Code:
    WWW	234	21%		1st correct	51%		
    WWR	98	9%		2nd correct	50%		
    WRW	118	11%		3rd correct	46%		
    WRR	85	8%					
    RWW	126	11%		1st correct when 2nd wrong			39%
    RWR	86	8%		2nd correct when 1st wrong			38%
    RRW	120	11%					
    RRR	231	21%		1st correct when 2nd correct			63%
    				2nd correct when 1st correct			62%
    	1098
    So yes, seems to be decently correlated...
    OK got around to pulling data from Season 10 - 31:

    Code:
    WWW	836	20%		1st correct	52%		
    WWR	369	9%		2nd correct	49%		
    WRW	444	11%		3rd correct	46%		
    WRR	336	8%					
    RWW	486	12%		1st correct when 2nd wrong			42%
    RWR	386	9%		2nd correct when 1st wrong			39%
    RRW	430	10%					
    RRR	812	20%		1st correct when 2nd correct			61%
    				2nd correct when 1st correct			59%
    	4099
    Not surprisingly, the results mirror the smaller data set.


    So this leads me back to the question of - should 1st place follow the normative / expected strategy of "betting to cover", as they do 80-90% of the time, or are they really placing themselves in toss-up?

    Yes, you may have outplayed your opponents (again, mostly thru buzzer timing) over the previous 60 questions, but historically you only have a 52% of winning by "taking matters into your own hands", and that's only a couple percentage points higher than the 49% of 2nd place. So all that hard work and it's going to be a coin flip whether or not you win the game.

    What I'd love to know (and can't find) is what the bet distribution by 2nd place has been in various scenarios. For example, when above 2/3 of 1st place's score, how many times do they min-bet, and how many times do they go all-out? (plus I imagine more permutation based on 3rd place's score)

    But ultimately I think it may get back to that idea of having no regrets and/or being able to live with yourself. No worse feeling than being in 1st place going into FJ, getting Final Jeopardy correct, and losing the game...

  15. #55
    Join Date
    Feb 2007
    Quote Originally Posted by snowdenscold View Post
    OK got around to pulling data from Season 10 - 31:

    Code:
    WWW	836	20%		1st correct	52%		
    WWR	369	9%		2nd correct	49%		
    WRW	444	11%		3rd correct	46%		
    WRR	336	8%					
    RWW	486	12%		1st correct when 2nd wrong			42%
    RWR	386	9%		2nd correct when 1st wrong			39%
    RRW	430	10%					
    RRR	812	20%		1st correct when 2nd correct			61%
    				2nd correct when 1st correct			59%
    	4099
    Not surprisingly, the results mirror the smaller data set.


    So this leads me back to the question of - should 1st place follow the normative / expected strategy of "betting to cover", as they do 80-90% of the time, or are they really placing themselves in toss-up?

    Yes, you may have outplayed your opponents (again, mostly thru buzzer timing) over the previous 60 questions, but historically you only have a 52% of winning by "taking matters into your own hands", and that's only a couple percentage points higher than the 49% of 2nd place. So all that hard work and it's going to be a coin flip whether or not you win the game.

    What I'd love to know (and can't find) is what the bet distribution by 2nd place has been in various scenarios. For example, when above 2/3 of 1st place's score, how many times do they min-bet, and how many times do they go all-out? (plus I imagine more permutation based on 3rd place's score)

    But ultimately I think it may get back to that idea of having no regrets and/or being able to live with yourself. No worse feeling than being in 1st place going into FJ, getting Final Jeopardy correct, and losing the game...
    Thanks for pulling this together - that's strong confirmation of the weakness in my model. I might update it at lunch to deal with this. I bet my answer won't change though: the consensus strategy for A will yield a lower chance of winning.

  16. #56
    Join Date
    Feb 2007
    Okay, now with Snowden's dataset, I don't need a monte carlo model to test the betting strategies. The probabilities now suggest that with CF62's strategy (B bets nothing), B will win 48% of the time. (I had the model built anyway, so I ran it too. The numbers checked out. yay math!)

    Here are the results*:

    With CF-62's strategy ($10,001 $0 $3,000):
    Code:
    	A	B	C
    1	52%	48%	0%
    2	31%	52%	17%
    3	17%	0%	83%
    With Brevity's strategy ($10,001 $5,001 $3,000)
    Code:
    	A	B	C
    1	72%	39%	9%
    2	20%	51%	18%
    3	8%	9%	73%
    
    (20.4% of the time, A & B end up tied for first)
    The website's suggested strategy ($10,000 $5,000 $6,999):
    Code:
    	A	B	C
    1	72%	39%	9%
    2	20%	51%	18%
    3	8%	9%	73%
    
    (20.4% of the time, A & B end up tied for first)
    As the test was what B's strategy should be... it's clearly to bet zero. But again, if A knows that, he'll bet less than $5,000 and win no matter what happens with the question!

    here are the results if A bets 4,999:

    Against CF-62's zero bet:
    Code:
    	A	B	C
    1	100%	0%	0%
    2	0%	100%	0%
    3	0%	0%	100%
    Against Brevity's $5,001 bet:
    Code:
    	A	B	C
    1	81%	19%	0%
    2	19%	63%	18%
    3	0%	18%	82%
    Player A will between 81-100% of the time by betting less than $5,000.






    * note, I did not factor in a tie-breaker. If two players are tied for the most money, I'm counting each as finishing 1st.

  17. #57
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Quote Originally Posted by gus View Post

    As the test was what B's strategy should be... it's clearly to bet zero. But again, if A knows that, he'll bet less than $5,000 and win no matter what happens with the question!
    But does he expect a min-bet* by B?

    I would LOVE to know the distribution breakdown of B's bets when within 2/3 of 1st place. I think it may be possible to write a script, but it would need to hit every single game episode page individually, so it will take a very long time to run once I write it, considering how slow each page response was on the first go round. (i.e. 5-10 seconds per page... that wasn't too terrible a wait for 22 pages [season 10 - 31], but for thousands of games - yikes!)

    Of course, I'm not a real programmer, and just fool around w/ the basics in python's "requests" module, so if anyone knows a more efficient script than sending a GET request to each game page and parsing thru the HTML**, let me know!

    here are the results if A bets 4,999:

    Against CF-62's zero bet:
    Code:
    	A	B	C
    1	100%	0%	0%
    2	0%	100%	0%
    3	0%	0%	100%
    Against Brevity's $5,001 bet:
    Code:
    	A	B	C
    1	81%	19%	0%
    2	19%	63%	18%
    3	0%	18%	82%
    Player A will between 81-100% of the time by betting less than $5,000.
    BUT if B goes all out (which again, would be extremely useful to know the likelihood of that!), a 4999 bet by A wins 49% of the time.

    So what's the weighted aveage? (we don't know... yet?)



    * note, I did not factor in a tie-breaker. If two players are tied for the most money, I'm counting each as finishing 1st.
    From what I've read, there is now a mandatory tie-breaker in regular season games. This definitely can alter the betting strategy in some scenarios, because your win % is essentially dropped in half if we consider the tie-breaker to be a coin-flip.



    Also, this thread example is all based on a 20K/15K/7K scenario, which is a very particular break-point leading to some odd conclusions about betting and ties. 20/14.5/7 might have been more interesting. Or 20/15.5/7. Both end up on either side of that break point.



    * Some terminology I've learned:

    "min-bet by B" can be called "2/3 wagering", where 2nd place is within 2/3 of 1st, and thus bets between $0 and 3B-2A. (in our example $0 to 5000)
    close-out bets or bets to cover by A is called Boyd's Rule
    certain situations that abandon Boyd's Rule are Shore's Conjecture - most often used to A's advantage if they suspect B needs to bet enough to cover C and not the normal 2/3 betting


    **
    Code:
    import requests
    
    LETTERCODES = ['WWW', 'RWW', 'RRR', 'WWR', 'RWR', 'WRW', 'RRW', 'WRR']
    CODECOUNT = 8
    SEASON_BEGIN = 31
    SEASON_END = 10
    
    codelist = {}
    for l in LETTERCODES:
        codelist[l] = 0
        
    base_url = "http://www.j-archive.com/finalstats.php?season="
    
    total_seasons = SEASON_BEGIN - SEASON_END + 1
    
    season = SEASON_BEGIN
    
    while season >= SEASON_END:
    
        code_counter = 0
    
        r = requests.get(base_url+str(season))
    
        lines = r.text.split('\n')
    
        for line in lines:
            modline = line.lstrip('<p>').split(' = ')
            if modline[0] in LETTERCODES and code_counter < CODECOUNT:
                codelist[modline[0]] += int(modline[1].split('<')[0])
                code_counter += 1
    
    #    print (codelist)
    
        season -= 1
    
    print (codelist)
    {'WRR': 336, 'RRW': 430, 'RWW': 486, 'WRW': 444, 'WWR': 369, 'RRR': 812, 'WWW': 836, 'RWR': 386}
    Last edited by snowdenscold; 10-22-2015 at 03:43 PM.

  18. #58
    Join Date
    Feb 2007
    Location
    Ashburn, VA

    2nd place wagering

    OK I wrote my script which is a little unprofessional, but seems to get the job done... thankfully all these HTML pages are formatted very, very specifically and I can use that to my advantage instead of some more robustness in my parsing logic.

    Anyway, since it takes awhile, I currently did a test run for Game ID's 2066 thru 2266. 201 games. For some reason, they can skip all around, so it will be a streak from the year 2007 for awhile, then jumps to 1999 for a bit, etc.

    Code:
    Total # of games:		201		
    Total # of "2/3" games:		97		
    Total # of "min-bets"*:		31		32%
    Non-min-bets in 2/3 situations:	66		68%
    * range of [0, 3B - 2A]


    I will try to let it run for the thousands of games available later (assuming the server doesn't kill it at some point for too many requests)
    Last edited by snowdenscold; 10-22-2015 at 04:59 PM.

  19. #59
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Total # of games: 1000
    Total # of game w/o parsing errors: 993
    Total # of 2/3 games: 555
    Out of the 555 total 2/3 games, 223 were min-bet (40%) and 332 were not (60%).

    To be continued for 5000 games worth...

  20. #60
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Quote Originally Posted by snowdenscold View Post
    Total # of games: 1000
    Total # of game w/o parsing errors: 993
    Total # of 2/3 games: 555
    Out of the 555 total 2/3 games, 223 were min-bet (40%) and 332 were not (60%).

    To be continued for 5000 games worth...
    Total # of games: 4501
    Total # of game w/o parsing errors: 4486
    Total # of 2/3 games: 2451
    Out of the 2451 total 2/3 games, 944 were min-bet (38.5%) and 1507 were not (61.5%).

    Next step will be to further break down what B does based on what C did.

    Also to remember to actually save the outputs to a text file so I never have to wait an hour+ for another 5,000 game analysis to run...

    If anyone wants to make sure I didn't screw something up (again, I am an amateur programmer and, yes, there are some hacked together control statements that I feel like should be done a better way...):
    Code:
    import requests
    
    def getKey(item):
        return item[0]
    
    GAME_ID_BEGIN = 500
    GAME_ID_END = 5000
        
    base_url = "http://www.j-archive.com/showgame.php?game_id="
    
    total_games = GAME_ID_END - GAME_ID_BEGIN + 1
    error_games = 0
    
    game = GAME_ID_BEGIN
    
    two_thirds_games = 0
    min_bets = 0
    non_min_bets = 0
    
    
    while game <= GAME_ID_END:
    
        # [pre-FJ, post-FJ, wager, correct?]
        scores = [[0,0,0, False],[0,0,0, False],[0,0,0, False]]
    
        has_error = False
      
        r = requests.get(base_url+str(game))
    
        if r.status_code != 200:
            print(game, "was not a valid game id")
            continue
    
        lines = r.text.split('\n')
    
        for i in range(len(lines)):
    
            # looking ahead 9-11 or 8-10 lines is based on examing the HTML source code... lame
            try:
                if "end of the Double" in lines[i]:
                    scores[0][0] = int(lines[i+9].split("$")[1].split("<")[0].replace(",",""))
                    scores[1][0] = int(lines[i+10].split("$")[1].split("<")[0].replace(",",""))
                    scores[2][0] = int(lines[i+11].split("$")[1].split("<")[0].replace(",",""))
    
                if "Final scores:" in lines[i]:
                    scores[0][1] = int(lines[i+8].split("$")[1].split("<")[0].replace(",",""))
                    scores[1][1] = int(lines[i+9].split("$")[1].split("<")[0].replace(",",""))
                    scores[2][1] = int(lines[i+10].split("$")[1].split("<")[0].replace(",",""))
            except:
                print ("Error occurred on game", game)
                error_games += 1
                has_error = True
                break
    
        if has_error == True:
            game += 1
            continue
            
        # determine wager amount and if it was correct
        for i in range(3):
            scores[i][2] = abs(scores[i][1] - scores[i][0])
            scores[i][3] = scores[i][1] >= scores[i][0]
    
        scores.sort(key = getKey, reverse=True)
    
        # establish 2/3 game situation
        if scores[1][0] >= scores[0][0] * .667:
            two_thirds_games += 1
            
            # Determine a min-bet by comparing to a range of [0, 3B - 2A]
            if scores[1][2] < 3*scores[1][0] - 2*scores[0][0]:
                #print (scores)
                #print ("Min-bet of", scores[1][2], "on a pre-FJ score of", scores[1][0])
                min_bets += 1
            else: non_min_bets += 1
                
        game += 1
    
    print ("Total # of games:", total_games)
    print ("Total # of game w/o errors:", total_games - error_games)
    print ("Total # of 2/3 games:", two_thirds_games)
    print ("Out of the", two_thirds_games, "total 2/3 games,", min_bets, "were min-bet and", non_min_bets, "were not.")

Similar Threads

  1. FSU Scandal Thread - Jameis in Jeopardy?
    By Duvall in forum Elizabeth King Forum
    Replies: 107
    Last Post: 01-27-2016, 08:43 AM
  2. Final Jeopardy
    By madscavenger in forum Elizabeth King Forum
    Replies: 7
    Last Post: 01-03-2015, 06:09 PM
  3. Duke '05 Grad on Jeopardy Tonight
    By blazindw in forum Off Topic
    Replies: 12
    Last Post: 10-21-2010, 11:55 PM
  4. Front Page Jeopardy! Question
    By SCMatt33 in forum Elizabeth King Forum
    Replies: 8
    Last Post: 06-11-2010, 02:09 PM
  5. Replies: 14
    Last Post: 07-16-2009, 08:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •