flazz.me

  • Monte Carlo Uno Simulation

    • 30 Dec 2010
    • 0 Responses
    •  views
    • code fooled by randomness game monte carlo simulation uno
    • Edit
    • Delete
    • Tags
    • Autopost

    Img_7376

    Can certain tactics give a players an edge at Uno? The following simulations play five players, one of which uses a tactic that presumably gives an edge, in 10,000 independent games of Uno.

    Control: all random

    This is important so we can compare how much of an edge plain old randomness can have.

    player tactic edge
    1 random -0.30%
    2 random +0.04%
    3 random +0.34%
    4 random -0.22%
    5 random +0.11%
    run-outs +0.03%

    edge is calculated by games won - ( number of games / number of players) as a percentage of all the games.

    run-out is when there are no more cards to draw, the came cannot continue. I'm displaying them as positive because when you add all the numbers up they should total 0%.

    So in this case, out of 10,000 games, player 2 came out ahead 0.04% of the time while player 5 fell behind 0.11% of the time, and nobody won 0.03% of the time (3 games) due to run-out. But really every player was within a small window of breaking even.

    Choose the most abundant color

    When playing a wild card you have a choice of which color to set for the next player to play. Reason dictates if you choose the most abundant color in your hand you are more likely to decrease the size of your hand. What happened when facing four random players against one who picks the most abundant color in their hand?

    player tactic edge
    1 abundant color +0.07%
    2 random -0.06%
    3 random -0.08%
    4 random -0.22%
    5 random +0.22%
    run-outs +0.07%

    Wow, if player 1 just picked a color at random it probably wouldn't have made a difference. Keep in mind the random players don't even consider their own hand and might choose a color they don't have.

    Play draw cards as soon as possible

    If you have draw cards, play them soon right? Hit 'em hard!

    player tactic edge
    1 eager draw -0.76%
    2 random +0.36%
    3 random +0.13%
    4 random +0.40%
    5 random -0.18%
    run-outs +0.05%

    hmm, I don't see anything noteworthy here. If you must infer something, infer that out of 10,000 games this tactic slightly loses.

    Play draw cards as late as possible.

    Don't play the draw cards soon, play them late. If draws are stacked you will be safe and it makes others more likely to have more cards when you have less.

    player tactic edge
    1 lazy draw +1.70%
    2 random -1.30%
    3 random -0.07%
    4 random -1.35%
    5 random +0.98%
    run-outs +0.04%

    We broke 1%, but player 5 was close and is only random. I don't consider it that significant.

    In the spirit of full disclosure ...

    These simulations are far from complete. The human interaction aspects like calling uno when a player has 1 card left, seeing the faces of other's cards accidentally, drawing more cards than needed to play, cheating, etc. are not simulated and probably effect the game.

    I didn't consider the ability for a player to look at the size of another player's hand. These are key factors when I play skip or reverse cards. So i really didn't test any tactics that specifically use skips or reverses. Does anyone know a better way to play skips or reverses?

    All my simulations test a strategy against 4 random players. The combinatorics of all possible tactics with possible games with 2 to 7 players is beyond my motivation for this casual exercise.

    Externalities: does a strategy effect other players without giving the user a significant edge or handicap? I have no idea but if you are qualified to answer these questions please let me know.

    Also, I could have made errors, I'm only human.

    Is the case closed?

    Will these tactics will give you an edge? Nope, I think we are fooled by randomness when applying them.

    Have I made it less fun? A bit. Then again maybe one can focus on the harder to simulate, human aspects of the game with the peace of mind that the above tactics are safe to not consider.

    Will I ever play Uno again? Sure, its fun foiling other people's tactics and seeing the looks on their faces. It is also a great way to kill time, the average number of rounds of these 40,000 games was about 24.

    If you have a tactic you think has an edge, or have found a flaw in my reasoning let me know I'll check it out, or grab the code!

    Why did I do this? To get an edge in Uno.

     

    • Tweet
  • bloated kombucha mother

    • 23 Dec 2010
    • 0 Responses
    •  views
    • kombucha mother
    • Edit
    • Delete
    • Tags
    • Autopost

    P71

    she's getting big
    • Tweet
  • tv-b-gone

    • 15 Dec 2010
    • 0 Responses
    •  views
    • dental floss diy electronics hack hackerspace skillhouse solder tv-b-gone
    • Edit
    • Delete
    • Tags
    • Autopost

    Img_0100

    It sends out a range of signals that commonly turn off TVs. Take this thing to a sportsbar, bestbuy, or an old-folks home and have some fun.

    My friends Marly & Christian at hackerspace let/helped me put this together. It wasn't that hard to wire up, but it was hard to wire up in a size that fits in a dental floss box. It was like making a ship in a bottle.

    For the real scoop: Marly's post & Christian's post

    • Tweet
  • diy kombucha

    • 14 Dec 2010
    • 0 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    P49

     

    Kombucha is a carbonated, slightly alcoholic, probiotic beverage that tastes like cider mixed with beer and champaign. it has numerous claims of health benefits and tastes great. One problem, it's pretty expensive, like $4 for a single serving bottle. Can I make it? so far so good.

     

    P51

    My recipe: the dregs of a bottle of store-bought kombucha + room temperature sweet-tea. So far it looks as if the culture is growing healthy. It has the kombucha smell.

     

    • Tweet
  • SHA1 Broken in Ruby on OS X

    • 9 Dec 2010
    • 2 Responses
    •  views
    • OS X mac ruby sha1
    • Edit
    • Delete
    • Tags
    • Autopost

    Bad data occurs when updating a Digest::SHA1 object with a string of size 512 MiB or larger.

    code that shows

    output

    Digest::SHA1#file:        e0c0e4aafa03db337897c27eb2cc531efac674e8
    updated < 512 MiB:        e0c0e4aafa03db337897c27eb2cc531efac674e8
    updated = 512 MiB:        93174e243c120d7bca6851e3a2e014c415ab6605
    updated = file size:        93174e243c120d7bca6851e3a2e014c415ab6605

    this was discovered in ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] running on Mac OS X Version 10.6.5.

    Linux checks out fine, I ran it on a few linux machines, no worries there.

    patch

    next step: debug ruby to see what is going on

    • Tweet
  • Giant Freak Apple

    • 2 Dec 2010
    • 1 Response
    •  views
    • apple ferrigno fresh market giant honeycrsip hulk
    • Edit
    • Delete
    • Tags
    • Autopost

    Img_0066

    Look at this thing!

    Img_0061

    Weighing in at 1.13lbs

    Img_0065
    Honeycrisp? I thought it was a Ferrigno?

    It tasted pretty good, not the best, but hey, they don't let me taste apples before I buy them.

    • Tweet
  • About

    programmer in austin

    141075 Views
  • Archive

    • 2011 (6)
      • July (2)
      • May (1)
      • February (1)
      • January (2)
    • 2010 (9)
      • December (6)
      • November (3)

    Get Updates

    Subscribe via RSS