Google's Project Loon is, by its very nature, subject to the whimsy of atmospheric winds. Those atmospheric winds do, however, have some semblance of a pattern to them. This means that where the balloon goes and how long it stays there could theoretically be controlled to some degree by somehow directing it to certain areas where those winds' directions are known. The team behind Project Loon has been trying to do just that since the project's inception, but different approaches over time have all mostly yielded the same lesson; controlling a free-floating balloon is incredibly hard, and can't be done reliably over a decent length of time. A solution based on on-board artificial intelligence, however, took things in a different direction.
An AI-based test flight of a Project Loon balloon that launched from Google's new remote station in Puerto Rico recently made its way to Peru by taking advantage of atmospheric winds, then managed to stay up over Peru and provide internet connectivity to a rural part of the country for a whopping 98 days. The test flight involved an entirely new algorithm baked into the balloon's software that takes advantage of machine learning. The balloon "learns" in real time what winds will take it where and how to get to them, and adds to or subtracts from the air in the inner balloon, or ballonet, to rise or fall and catch those winds.
When it was all said and done, the balloon was adjusted about 20,000 times to ride just the right winds to stay roughly over the target area upon arrival. The post by the team that described the feat did not say how many of those adjustments were made remotely and how many the balloon made using its onboard AI. After the balloon had done its duty for the 98 day tour, local air traffic and the Googlers behind the balloon worked in tandem to bring it down as gently as possible in the flattest, least populated land that they could find. The balloon came down safely, and was able to be salvaged and brought in. From there, it will either be patched up and relaunched, or recycled and harvested.