Seldon invented psychohistory, a discipline that would allow him to predict the future. The TV series is based on Isaac Asimov's "Foundation" story, though psychohistory predates the author's work, even if it's used a bit differently in this fictional sphere. In "Foundation," psychohistory is best described as using math to anticipate upcoming events. Seldon is using psychohistory to determine when the emperors' reign will end. As a result, it's locked within the titular Foundation to ultimately protect humankind.