Hacker Cinema
Yahtzee

Yahtzee

1988 · TV series · 30 min episodes · 1 season

Yahtzee is a game show that aired from January 11 to September 1988. Based on the dice game Yahtzee, the show was hosted by Peter Marshall, with Larry Hovis serving as both the show's announcer and a regular panelist. Each week featured a different hostess serving as "dice girl", including Kelly Grant, Denise DiRenzo, and Teresa Ganzel. Yahtzee was originally taped at Trump's Castle in Atlantic City, New Jersey, though later it moved to Showboat Hotel & Casino.

1 neutralfrom 1 commenter

IMDbTMDBTrends

Where to watch

No streaming data for this title.

1 comment on Hacker News

  1. NeutralanyfooFeb 10, 2023

    Around 15 years ago, when casual little games on Facebook were still a thing (actually when Facebook itself was still a thing), I used to play Yahtzee on the site while watching TV shows or whatever. It was one of the most popular games on there. For me it was something to fidget with (there was no money involved or anything, just a personal high score), so I played it a lot.

    I felt more and more that dice values of specifically 1 and 6 were harder to come by than other values, so one day I sat down for a few minutes and logged the value of 100 or so dice throws. Turns out I was right, the distribution was not uniform: 2-5 were fine, but it seemed that it was twice as hard to get a 1 or a 6 compared to any other value.

    I even did a chi-squared hypothesis test, because I was crazy. (And because I was studying for my statistics minor in university at the time).

    Seeing the result, the problem was pretty clear, without even knowing the source code. Almost certainly, they had a random number generator giving a number in a uniform range, let's say from 0 to 1, and did something like the following to get a dice value from 1 to 6:

    value = round(random()*5)+1

    Do you spot the issue?

    The problem is that round() rounds to the nearest integer. So any value between, say, 1.5 and 2.5 (exclusive at one end) rounds to 2, 2.5-3.5 rounds to 3, and so on. Add 1, and you have the dice value.

    But the ranges for dice values 1 and 6, are only 0 to 0.5 and 4.5-5 respectively (remember that we add 1), so ranges that are only half the size.

    The fix should be extremely simple:

    value = floor(random()*6)+1

    The crucial point being to use floor() or ceil() instead of round(), to only round towards one direction.

    I wrote up exactly this in a short email to the company that made the Yahtzee game. They did not reply and just silently fixed the bug, right after my email. I was disappointed and stopped playing.