On May 6, 2010, the Dow Jones plummeted 1,000 points in minutes before mysteriously bouncing back, wiping out $1 trillion in market value faster than you could refresh your portfolio. This is the story of how high-frequency trading algorithms turned Wall Street into a video game—and what happened when the machines started playing by their own rules.