If artificial intelligence is headed towards an apocalyptic end for humanity, the machines are sure making the path to that fate as warm and comfortable as possible. Scientists have developed a machine learning system that makes video streaming smoother and faster, which is just the kind of advance that will probably have our increasingly sedentary selves to doubling down and curling up with Netflix for more hours each week.

“We wanted to see if there was a way to leverage artificial intelligence (via neural networks) to choose different algorithms to optimize for different network conditions — in this case, for the application of streaming online video,” Hongzi Mao tells Inverse. Mao is a computer scientist at the Massachusetts Institute of Technology and lead author of a new paper outlining the creation of Pensieve, an A.I. system that chooses different algorithms to help facilitate video streaming depending on varying network conditions.

“Our approach consistently performed better than the state-of-the-art approaches,” he says. “Specifically, we found Pensieve controls the rebuffering rate significantly better than other schemes.”

The research team found that Pensieve could stream videos 10 to 30 percent faster than conventional algorithms could, with users rating the quality of their viewing experiences 10 to 25 percent higher.

When it comes to streaming videos over the internet, providers currently use algorithms to slice up content into chunks that are loaded as the movie progresses and to upload lower-resolution streams for slower or spotty internet connections. This keeps the video going forward uninterrupted if the connection hits a hiccup, but it also makes it tougher to jump forward or backward in the stream in an instant.

Streaming services like YouTube — which has over a billion hours of video available through its website — use this adaptive bitrate (ABR) algorithm because it clamps down on expending unnecessary resources. Most users don’t watch videos all the way through, so it’s inefficient to have the entire stream uploaded as fast as possible.

Of course, those users who do watch to the end don’t care what the company’s counterarguments might be — they just want their video here now, without having to wait for the buffering to end. Mao and his team are hopeful Pensieve could provide that alternative.

The new A.I. system also better caters to changing conditions. A user going into a network dead zone might find that their streaming service could shrink the bitrate down in order to load more of the video before the dead zone hits.

But as an A.I. system, Pensieve proves its more than just a tool — its an intelligent, adaptable agent. “What we were quite surprised with is that Pensieve actually generalizes well even in network conditions it hasn’t seen before,” says Mao. “When we tested it in a ‘bootcamp’ setting using synthetic data, it could still outperform the best existing schemes. This suggests that it’s not merely doing pattern recognition, but can figure out a control logic that is generalizable across different conditions.”

The system could theoretically replace ABR schemes currently used by companies like Netflix and YouTube, says Mao. It’s just a matter of optimizing Pensieve to better cater to real-world conditions. But there are applications that could extend beyond video streaming, and into networking control problems across a variety of systems.

“For example,” says Mao, “in job scheduling in a cloud-computing system, there might be multiple jobs that are running at once that you want them to finish as soon as possible. A system like Pensieve could enable better ordering and packing of jobs to be done as efficiently as possible.”

Moving forward, the research team plans to test out Pensieve in VR experiences, in which extremely large amounts of data need to be funneled through networks at incredible speeds. Most networks can’t readily handle this kind of work, but Pensieve may prove capable of doing so.