Silicon Valley has become obsessed with "disrupting" food. Alarming headlines grab the public's attention -- stories about meat grown in labs, flavorless "Soylent" meal replacements and "chickenless eggs."

The tech industry is "disrupting" food by replacing the real with the fake.

But other parts of the industry are doing the opposite: replacing the fake with the real.

The newest Silicon Valley food revolution isn't about bio-engineering strange new food replacements, but using algorithms and artificial intelligence (A.I.) to transform how real food is marketed and distributed. That's right: Software is delivering fresh, natural and high-quality food in situations where only junk food was available.

Five years ago, Silicon Valley investor Marc Andreessen famously observed that "software is eating the world." And now software is eating the food world.

Let me give you two examples.

The disruption of home delivery

I told you in October about a Silicon Valley startup called Zume Pizza, which is best known for the use of industrial robots in the pizza-making process. Zume's delivery trucks each contain 56 computer-controlled ovens. When Zume Pizza trucks are four minutes from your house, software automatically fires the right oven to 800 degrees, so your pizza is fresh and hot out of the oven when it's delivered.

Here's the best part: Zume co-CEO Julia Collins told me that Zume holds a patent for what they call "cooking en route," which covers the cooking of any food inside the truck during delivery. (The patent cost the company a quarter of a million dollars in legal fees and four years of work to secure, according to Collins.)

The patent covers a wide variety of revolutionary ideas, most spectacularly algorithms designed to predict what people will order before they order it. These predicted orders are loaded onto the truck in advance, so that when the food is ordered, it's already on its way.

What you're unlikely to hear about Zume Pizza is that the company wants to augment pizza deliver with other foods.

Collins envisions a Zume Pizza truck where only half the truck is devoted to automated pizza baking, but the other half contains a salad-tossing robot that creates the branded salad of a partner company, a frozen yogurt robot or a stir-fry robot.

The overall idea is a restaurant on wheels that uses A.I. and robots to make entire meals to order minutes before delivery.

The end result of this idea is a transformation in the quality of home-delivered food -- not to mention the speed. Instead of waiting a half hour for a soggy pizza made more durable with stabilizers and other additives, Zume is working toward a system where you get a fresh, natural pizza right out of the oven with a freshly tossed salad and a frozen yogurt dessert delivered five minutes after you order it.

This approach uses software to transform a junk food scenario -- pizza delivery -- into a quality-food scenario. Zume plans to expand beyond Silicon Valley and go national, then global in the years ahead.

Workplace junk food is also being disrupted in Silicon Valley.

The disruption of vending machines

Snack vending machines are everywhere. Here's how they work. A vending machine company makes a deal with a company that wants to provide snacks to employees. The vending company sends a person around every week or every few weeks to re-stock the machine with items bought at wholesale, collects the money (which is split with the business owner) and makes sure the machine is working properly.

Any food placed into an old-school vending machine must be durable. It has to survive for weeks at unpredictable temperatures, and also survive the drop when selected. That's why vending machine food tends to be non-fresh, unhealthy junk food.

With most vending machines, there are two or three items that are most popular and other items that might be selected as a second or third choice only after the favorite item runs out. The vending company has no idea.

Stocking vending machines is up to the driver, who sometimes stock them to get rid of stuff. For example, if certain items never sell in one location, the items might be moved to another machine in another location.

Vending machines are fast and convenient, but offer low-quality food at high prices. They also tend to offer snack foods, rather than meals -- chips, candy bars, cookies and maybe snack cakes, nuts and gum. Because vending machines are so convenient, they encourage employees to eat snacks instead of meals.

Silicon Valley is starting to disrupt the vending machine industry. A San Rafael, Calif., startup called Byte Foods, wants to turn the industry on its head.

Byte "vends" out of "smart" refrigerators. Currently, the company is operating hundreds of these devices at workplaces, as well as hospitals, gyms and apartment complexes.

Each food item is tagged with an RFID chip, which the refrigerator can detect. You swipe a credit or debit card to open the fridge. When the door is closed, whatever is missing is charged to your card.

Byte Foods offers locally sourced foods. They sell beverages, sandwiches, burritos, soups and salads. The company focuses on premium, high-quality, often organic food you might find at a Whole Foods Market or similar stores, but at generally lower prices than the store sells them. (Suppliers include Mixt Greens, SF Soup Co, Blue Bottle, Rustic Bakery and others.)

The magic happens with the data they collect and what they do with that data, according to Lee Mokri, who founded the company with his wife Megan.

In a nutshell, the RFID chip, which is cheap and disposable with the food container, identifies everything about the food, including its source, who packed it, when it was delivered to and when it was purchased. The payment card system (instead of cash) identifies the buyer.

Byte Foods feeds this data into its proprietary algorithms, and amazing things are possible. For starters, individual users can set up an account. If, for example, someone gets the same cold-brew coffee drink every afternoon, the customer can be automatically notified if the fridge is running low.

The fridge is capable of flex pricing. So if a specific item is selling slower than expected, the price can drop automatically.

Fresh food on the premises is a major employee perk, and employers can make it even more of a perk by subsidizing it. For example, they can make all the food free, or they can make it cheap by offsetting, say, half the cost.

Unlike vending machines, which are stocked based on what's on the truck, Byte Foods products are determined by software at the warehouse and delivered in refrigerated trucks at most every day, and at least three times a week.

Byte can test new food items on the fly, and know exactly how popular it is and adjust inventories accordingly. Software turns food into something that can be intelligently recommended or sourced, just like, say, books on Amazon.com. Over time, the Byte fridges are stocked with the items employees really want.

Every food item has a "trigger" expiration date, often two days, at which point the food is picked up and donated to an organization called ExtraFood.org, making the food fresher for employees and eliminating food waste.

The end result is fresh, healthy, premium, customized meals, rather than stale, unhealthy junk food snacks.

Why software technology makes better food better than biotech

Futurists have been predicting the transformation of food for decades. Remember when all our food would come in a pill or would be sold freeze-dried? Astronaut ice cream, Tang and other "space food" was the future. And some Silicon Valley companies are still working on futuristic fake foods.

But the reason predictions of fake foods never came true is that futurists forgot to take human nature into consideration. It turns out people take pleasure in eating real food.

Now, extremely advanced software technology is enabling high-quality real food to be delivered to homes and offices in a low-cost, fast, flexible and customizable way.