Talented and dedicated engineers spent countless hours designing Japan’s rail system to be one of the world’s most efficient. Could have just asked a slime mold.