Behind the most-watched series on Netflix, the highest-rated films on IMDb, and the speeches of the world's greatest corporate leaders lies the same storytelling algorithm.