Diogo Mónica once wrote a short computer script that gave him a secret weapon in the war for San Francisco dinner reservations.

This was early 2013. The script would periodically scan the popular online reservation service, OpenTable, and drop him an email anytime something interesting opened up—a choice Friday night spot at the House of Prime Rib, for example. But soon, Mónica noticed that he wasn't getting the tables that had once been available.

By the time he'd check the reservation site, his previously open reservation would be booked. And this was happening crazy fast. Like in a matter of seconds. "It’s impossible for a human to do the three forms that are required to do this in under three seconds," he told WIRED last year.

Mónica could draw only one conclusion: He'd been drawn into a bot war.

Everyone knows the story of how the world wide web made the internet accessible for everyone, but a lesser known story of the internet's evolution is how automated code—aka bots—came to quietly take it over. Today, bots account for 56 percent of all of website visits, says Marc Gaffan, CEO of Incapsula, a company that sells online security services. Incapsula recently an an analysis of 20,000 websites to get a snapshot of part of the web, and on smaller websites, it found that bot traffic can run as high as 80 percent.

People use scripts to buy gear on eBay and, like Mónica, to snag the best reservations. Last month, the band, Foo Fighters sold tickets for their upcoming tour at box offices only, an attempt to strike back against the bots used by online scalpers. "You should expect to see it on ticket sites, travel sites, dating sites," Gaffan says. What's more, a company like Google uses bots to index the entire web, and companies such as IFTTT and Slack give us ways use the web to use bots for good, personalizing our internet and managing the daily informational deluge.

But, increasingly, a slice of these online bots are malicious—used to knock websites offline, flood comment sections with spam, or scrape sites and reuse their content without authorization. Gaffan says that about 20 percent of the Web's traffic comes from these bots. That's up 10 percent from last year.

Often, they're running on hacked computers. And lately they've become more sophisticated. They are better at impersonating Google, or at running in real browsers on hacked computers. And they've made big leaps in breaking human-detecting captcha puzzles, Gaffan says.

"Essentially there's been this evolution of bots, where we've seen it become easier and more prevalent over the past couple of years," says Rami Essaid, CEO of Distil Networks, a company that sells bot-blocking software.

But despite the rise of these bad bots, there is some good news for the human race. The total percentage of bot-related web traffic is actually down this year from what it was in 2013. Back then it accounted for 60 percent of the traffic, 4 percent more than today.