A visual explanation of Fisher–Yates shuffle
A visual explanation of Fisher–Yates shuffle launched on January 14, 2012 with 176 votes, #8 of 306 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 14 years on.
In plain words
This interactive visualization explains the Fisher–Yates shuffle algorithm, a method for randomizing the order of elements in a deck or list. It demonstrates how repeatedly selecting a random card from the remaining deck and setting it aside creates an unbiased shuffle, ensuring fair card games like Texas Hold 'em. The tool shows the algorithm's mechanics through visual diagrams, helping developers and others understand how to implement proper randomization in code without introducing bias.
written from the facts on this page · September 2026
From the sources
If you want to play a game of Texas Hold ‘em with friends, you should shuffle the deck first to randomize the order and insure a fair game. But how? A quick way of seeing an algorithm’s bias is a matrix diagram . A simple but effective way of doing this is to pull a random card from the deck repeatedly and set it aside, incrementally building a new stack. As long as you pick each remaining card from the deck with equal probability, you’ll have a perfectly-unbiased random stack when you’re done: But let’s say instead of a physical deck of cards, you wanted to write code to perform this same task with an in-memory array of n elements. Sounds straightforward (in part), but how would you pick a…from bost.ocks.org
Does a similar job
all alternatives →
Allocate poker chips optimally with mixed-integer nonlinear programming2024 · github.com · ▲213Every time I play a casual cash poker game with friends, we spend the first several minutes struggling to figure out chip denominations. I built this to automate that process. Try it out here (the submitted link goes to the GitHub repo): https://jstrieb.github.io/poker-chipper/ It turns out that picking chip denominations optimally—such that as many chips are distributed as possible, and such that the denominations are nice—is hard (in the computational complexity sense). Upon reflection, the problem seemed to be a perfect fit for constrained optimization. I first got a…
- IQ
Floptimal – Preflop ranges reimagined2021 · floptimal.com · ▲135- AVA visualization of how humans pick random numbers2021 · humanrandomness.com · ▲17
- SPSortraits, Portraits of Sorting Algorithms2019 · wtracy.gitlab.io · ▲132
- ARAnimating randomized L-Systems in real time2020 · ehrenjn.github.io · ▲110
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 4d ago · permit.petercai.com
- IV
Life & fun · 16d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 17d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 11d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 15d ago · carrierexplode.com

Life & fun · 25d ago · space.bl2.net
Source: Show HN post ↗
Launched alongside, January 2012
the whole month →- WM
Life & fun · 2012 · mongout.com
- SScrollorama▲395
Life & fun · 2012 · johnpolacek.github.com

ålenkå files. Full list of files for ålenkå
Dev tools · 2012 · sourceforge.net
- IM
Life & fun · 2012 · politicianmarket.com
- HI
I have been taking Andrew Ng's Machine Learning course. The lecture module on Neural Networks ends with an intriguing video of the ALVINN autonomous car driving itself along normal roads at CMU in the mid 90s. I was inspired by that video to see what I could build myself. A link to my incomplete write up was posted a couple of weeks ago (ouch!) but I finally finished it and open sourced the code tonight (so you can build your own self driving car). What do you think? http://blog.davidsingleton.org/nnrccar https://github.com/dps/nnrccar
AI · 2012 · blog.davidsingleton.org
- CC
Life & fun · 2012 · carsabi.com