At his laboratory console, Rhiju Das is making a game of a pressing public-health problem. He is recruiting thousands of videogamers to develop a better test for tuberculosis, which infects about one-third of the world’s population.

All they have to do is design a single molecule that can diagnose the disease in a patient’s bloodstream quickly, easily and cheaply—a task that so far has eluded public-health experts. To muster a crowd of amateurs to attempt it, Dr. Das, a biochemist at the Stanford University School of Medicine,...