Using data from the game "Ebb and Flow", researchers are training machine learning algorithms to mimic the human ability to switch attention between tasks. The findings shed new light on cognitive control and may expand the current understanding of disorders marked by cognitive control deficits, such as bipolar disorder and schizophrenia.