Travel is supposed to be relaxing, but money ruins everything. Trips usually begin with the stressful ordeal of trying to figure out how to avoid paying more than you should for a plane ticket. Airlines change their prices constantly, and because we all but eliminated travel agents, nobody has the time to pore over websites in search of the best deals. That’s why the future of travel depends on bringing travel agents back as artificial intelligence.

“Getting rid of travel agents to save a $15 fee or whatever it was when someone else was doing the work for you ends up being a false economy,” Patrick Surry, the chief data scientist at the Hopper travel startup, tells Inverse. “Because they have to spend multiple hours doing it themselves, and they end up spending more than they should because they don’t know the ins and outs of the industry.”

Hopper analyzes ticket prices to let people know the best time to buy a ticket. Surry explained that there’s no magic answer — while some research suggests that buying tickets on a certain day of the week can lead to higher prices, the truth is that airlines vary the cost of a ticket so much that one solution can’t guarantee the lowest price all the time. The industry doesn’t work that way.

But there are ways to improve the chances of getting a good price. Expedia said in 2015 that booking a ticket in advance can save people hundreds of dollars. But how far in advance depended on the place of departure and the destination; it also required prospective travelers to plan out their trips at least 21 days beforehand.

That same report said that people can pay around 11 percent more for a ticket if it’s booked on Friday than if they had booked it on a Sunday. But after crunching the numbers on many flights since then, Surry said that booking on a Sunday won’t always save people money, and that airlines will eventually cave to pressure to make the process of traveling a little more user-friendly in the future.

People always want to know how to cheat the system. But that just isn’t going to happen as the airline industry entrusts its systems with pricing decisions. “You’re working against an army of computers on the other side,” Surry told Inverse. “There’s no logic you’re going to be able to use that can outsmart that machine.” That’ll become more true over time until A.I. travel agents are all but mandatory.

Airlines can’t make it easy to know where to get free wifi or upgrade their IT systems but they can certainly make working around the system more of a hassle.

So how will you get the best ticket prices in 2020? You can try booking on a Sunday — that’s worked in the past. But if Surry is right, you’re better off just telling an app where you want to go and letting it handle everything else. Human travel agents disappeared, but A.I. will soon take over many of their functions, and traveling will be better because of it.

Photos via Getty Images / Manny Ceneta