The immersive and often exhilarating experience of “flow” while playing sports, making art, or working is a much sought-after state of mind associated with peak creativity and productivity, which is why artificial intelligence programmers and human resource departments alike are eager to find ways to cultivate it.But can you really order up the ingredients to achieve such a subjective experience?\nYale University psychologists say yes: They have developed a mathematical theory of flow, and argue that it is possible to enhance immersion and engagement in almost any task by manipulating a few key variables.\nRyan Carlson, a doctoral student in the Department of Psychology, Paul Stillman, an associate research scientist in marketing at the Yale School of Management, and David Melnikoff, formerly of the Yale Department of Psychology now of Northeastern University, published their formula April 26 in the journal Nature Communications.\n“These principles underlying flow may be unconscious but they are not random — and work within a biological system that can be described in mathematical terms,” said Melnikoff, corresponding author of the paper.\nThe basic equation underlying their computational theory of flow is relatively simple: it computes the mutual information between desired end states and means of attaining them, a quantity expressed as I(M;E). Exercise is one example they use to illustrate the concept.\nWhen people exercise, they have a desired end state, say, losing five pounds. People also have a means of attaining their end state, perhaps jogging. Whether they jog and how often and far is the means and is informative of whether they will achieve their end state.\n“Our theory says that the more informative a means is, the more flow someone will experience while performing it,” Melnikoff said. “The formula is a way of mathematically quantifying exactly how informative a particular means happens to be.”\nExercise companies such as Peloton are adept at creating an immersive experience by making means highly informative. For instance, they use exercise output to rank users on “leader boards,” which dramatically increases the amount of information riders get from their means of exercising.\n“There are thousands of positions on the leader board where a rider could finish — thousands of possible end states — and the rider's performance reveals which of these end states will occur,” Carlson said. “That is a lot of information, far more than you'd normally get from a workout. When is the last time exercising allowed you to rule out literally thousands of possible end states?”\nOptimizing I(M;E) is also a key goal of artificial intelligence programmers. In essence, AI experts are trying to build machines that behave like people in flow states, the authors argue.\nMelnikoff, Carlson, and Stillman say in theory the formula for flow can improve performance for almost any task, a potentially valuable tool for human resource departments seeking to increase worker interest and productivity. But they also realize some inherent limitations using these principles to improve outcomes of tasks — personal interest and talent.\nFor instance, Melnikoff knows a master gardener who says she experiences flow in creating beautiful landscapes, a passion he does not share.\n“Because I’m an incompetent gardener, the means of gardening provides zero information. I already know the end state — a dead garden,” he said.