Many of us spend hours on the Internet researching flight deals, trying to figure out an airfare pricing system that seems random.
Fees appear to fluctuate without reason, and longer flights aren't always more expensive than shorter ones.
But behind this is actually the science of dynamic pricing, which has less to do with cost and more to do with artificial intelligence.
It's been more than a hundred years since the first scheduled flight.
The Comet, scheduled by British Overseas Airways Corp., is to start the world's first jet passenger air service.
In the beginning, commercial aviation was a tightly regulated market place, where airfares were based on distance traveled rather than passenger demand.
Most international routes were operated by a single national carrier and the lack of choice resulted in uncompetitive fares for consumers.
Deregulation, however, changed all that.
In 1978, the U.S. government began the process of removing government controls over routes and market entry for new airlines.
In 1983, fares followed.
And by the early 1990s, the liberalization of the aviation industry had spread around the world, making pricing more competitive.
Critics also say there was too much competition in the first years after deregulation.
Airlines merged and became more dominant, changing the industry from a regulated cartel into an unregulated cartel.
In the U.S., just four airlines control 68% of the domestic airline capacity.
While ticket prices have been falling between major hub airports, the lack of competition and a reduction in flights has resulted in higher average airfare for smaller, less competitive cities.
But this hasn't halted the demand in air travel.
The number of airline passengers across the globe has continued to grow, particularly in the last ten years, with the amount of people choosing to fly skyrocketing by nearly 1.8 billion.
So what does this increasing volume of passengers mean for pricing tickets?
Despite steep surcharges and baggage fees tacked on during the 2007-2008 oil shock, ticket prices aren't actually focused on the seats' combined cost such as taxes and fuel.
Instead, airlines price tickets using a strategy called airline revenue management.
Its end goal? Make as much money as possible.
This is working in real time.
So when a customer goes to book a seat, the airlines determines the price they see by analyzing a wide range of factors including the status of their entire network.
Of course, these decisions aren't being made by humans.
Algorithms adjust fares by using information like past bookings, remaining capacity, average demand for certain routes and the probability of selling more seats later.
One example of this process being used is for pricing connecting routes.
Let's say you want to fly London to Miami.
The flight you want to book also serves as the first leg of a connected flight to Bogota.
While you're traveling less distance to Miami, you may end up paying more than passengers flying through to Bogota.
That's because airlines are trying to discourage you from buying seats that they want to keep available for the full journey.
This entire thought process is done by the algorithm, which predicts those seats will sell for a higher price in the future.
Airlines also profile their customers to help them adjust prices.
This often means placing passengers into one of two groups: leisure or business.
And the way each group is priced is very different.
An airline offering a flight from London to Bali can assume that the people on that route are largely holidaymakers, so it places them in the leisure bracket.
These passengers usually book months in advance, so airlines tend to start the price for these seats relatively high.
It then adjusts the price according to market response, making sure it's high enough to maximize profit, but low enough so that it doesn't result in unused capacity.
While on a typical business route, such as London to Hong Kong, airlines usually start with low prices to fill a minimum capacity.
Then it increases prices steeply for business travelers who book last minute.
That's because airlines know business travelers tend to book later and are far less price sensitive than their leisure counterparts.
In fact, business travelers are willing to pay 60% more on average to secure a seat.
Some analysts believe airlines use consumer's Internet browser cookies to determine what flights they've been looking at.
This way, they can increase those prices to encourage them to buy.
But solid proof of this practice is hard to come by, and it's something airlines and price comparison sites strongly deny.
Targeted dynamic prices however can increase customer satisfaction and encourage consumer bookings. For example, a member of an airline loyalty program could receive 'just for you' price displays based on their purchasing history.
Technology has also allowed some airlines to create a 'basic economy fare' with limited amenities to compete with minimal service, low cost carriers.
That lower fare is key if full service carriers want to appear on the first page of search engines like Google Flights. But it's not just airlines that are using AI technology to their advantage.
Consumers now have access to sites which monitor fares, using their own algorithms and past data, to predict the lowest price a seat will reach to then alert their customers.
The threat airfare search sites pose to airlines' dynamic pricing system even saw United Airlines suing the website Skiplagged, which helps passengers find loopholes for cheaper tickets.
With AI having such an important role in the field of air travel pricing, it's likely that complex algorithms will continue to fight the airfare war.
That may not be a bad thing, as airlines manage a growing number of passengers and consumers push for better choices and easier ways to book their trips.