Here’s a startling prediction: if current labor trends continue, one out of three American men, ages 25-54, will be out of work by mid-century.

That’s what former U.S. Treasury Secretary Lawrence Summers expects. “Job destruction caused by technology is not a futuristic concern,” Summers wrote this fall. “It is something we have been living with for two generations.”

Contract jobs, gig work and robots have all made work more precarious. Silicon Valley pioneered many of the changes, and now some tech entrepreneurs believe they have a solution to the economic anxiety they’ve helped create.

Put bluntly, it’s free money. That’s the idea behind something called “universal basic income,” where the government gives everyone a monthly check, no strings attached, to meet basic needs. Y Combinator, the influential startup accelerator behind hits like DropBox and Airbnb, is funding a basic income pilot in Oakland to test the idea.

Sam Altman says he’s been thinking about how automation will affect people since he was a kid in St. Louis, obsessed with computers and science fiction. That’s why he’s championing – and investing in – the basic income experiment.

At 31, Altman is Silicon Valley. He dropped out of Stanford after co-founding a mobile app company called Loopt. It later sold for over $43 million. Now he is president of Y Combinator. Recently Altman was the subject of a lengthy New Yorker article subtitled “Is the head of Y Combinator fixing the world or trying to take over Silicon Valley?” One thing is certain. Altman wants us to be prepared for a robot revolution.

Silicon Valley tech investor and Y Combinator president Sam Altman, 31, at home in San Francisco’s Mission District with his dog Lola.

“I think this is on the order of the industrial revolution and the agricultural revolution,” Altman said. “We have a new technology, in this case it’ll be automation, software automation, that will replace a giant percentage of current jobs.”

“I believe we’ll find new jobs,”Altman added. “But if people don’t think the current jobs won’t be destroyed, they’re very wrong. After we all stopped farming we found things to do, so I think we’ll get through this, but it’s going to be a really major change.”

Barefoot, wearing shorts and a T-shirt, Altman talked matter-of-factly about a sci-fi future that makes driverless cars sound like kid stuff. “I think we are going to see a new breed of intelligent life that looks not that much like the humans of 2016,” he said. “That may be A.I., that may be cybernetically-enhanced humans, that may be genome-edited humans that aren’t humans at all.”

Is your brain hurting yet? Altman’s point: if it’s true the future isn’t going to look anything like the present, it will have major consequences for how we work and what makes us happy. “I don’t think we’re ready for that,” Altman said.

So, in a world where machines do much of the work, how will people support their families? And what happens to the connection between work and dignity? “This is a deeply American ideal where laziness is a vice and work, no matter what, it is is a virtue,” Altman said. “My view of this is that creating value is the thing we should value and busy work and unpleasant work we should try to automate.”

At a high-end coffee shop in downtown Palo Alto, coffee is the new wine.

As for those willing to do unpleasant work, as long as it supports a middle class life? For those people, places like Silicon Valley are increasingly off-limits.

You can witness the middle class “hollowing out,” or least being pushed out, of cities like Palo Alto. Not far from the campus of Stanford University, Teslas and BMW’s cruise by modest homes that sell for $3 million and the technorati line up for handcrafted coffee.

Sitting outside one of those fancy coffee shops, Paul Oyer, a professor of economics at Stanford’s Graduate School of Business, said it’s hard to imagine more concentrated wealth than Silicon Valley right now. “We’re very close to the offices of Palantir, which is a big tech employer here in Palo Alto and people who work there make a lot of money,” Oyer noted. “We’re five miles or so from the headquarters of Facebook, many of them are millionaires in stock.”

Meanwhile the people who work in the coffee shops and restaurants in Palo Alto can’t afford to live in the city. John Dattke, general manager at Buca di Beppo in the city’s downtown, commutes every day from Fremont, 18 miles across the Bay. It’s cheaper there.

“I can’t afford Palo Alto,” Dattke said. “It’s ridiculous.” One-bedroom apartments average over $2,700 a month.

In Silicon Valley, growing inequality is fueling talk of a basic income among academics and the tech elite. Over the decades, conservatives have seen a basic income as a substitute for numerous welfare payments and a way to streamline welfare bureaucracy. Think Milton Friedman and the “negative income tax,” a version of basic income Friedman popularized in the 1960s and 70s.

Liberals have viewed basic income as more of a supplement to existing benefits to help people get by in a world of precarious work. There have been limited experiments with it in the past, but no country has ever adopted it. Several countries are set to launch pilots in 2017, including the Netherlands.

“There’s just a very strong trade-off,” Oyer said. “On the one hand, you want to protect people from things they have no control over. And on the other hand, we worry very much that a universal basic income is going to lower people’s incentives to work and earn a living.”

That’s why Altman and other tech investors are putting up about $1.5 million for a small basic-income experiment across the bay in Oakland. It will last a year and act as pilot for a larger, longer-term experiment. In the initial pilot, 100 people will get $1,500 a month, although Y Combinator says that could change as more is learned. Pilot organizers are keeping mum about most of the details, concerned too much publicity could ultimately have negative results on the research.

Stanford University is at the heart of Silicon Valley, producing some of the tech industry’s most successful entrepreneurs and investors.

Stanford sociologist David Grusky, director of the university’s Center on Poverty and Inequality, said one strong reason to do the experiment is the alarming decline in prime-age employment among men.

“One possibility is we should have a producer class raking in extraordinary amounts of money and then perhaps a consumer class that’s subsisting on basic income,” he said.

The other possibility is public jobs, he said. “We can deliver jobs just as much as delivering money. And one might say that delivering jobs kills two birds with one stone. It solves the prime age employment problem AND at the same time we could use those jobs to build a better public infrastructure.”

Grusky believes the U.S. should invest in “high quality data sets” that will help leaders evaluate social policies based on evidence, not ideology. “Partisan views often masquerade under the banner of being evidence-based, but at the end of the day it’s partisan beliefs that are motivating our decisions,” he said.

He wants to find out: will “free money” enable people to do something creative or entrepreneurial they might not otherwise do? Or will it just encourage people to put up their feet and watch Netflix?

Critics have cast the Oakland experiment as a way for Silicon Valley elites to appease the workers their technology is leaving behind. “If I were on the other side, I might feel that myself,” Sam Altman replied. “That is genuinely not my intent. I also think we cannot stop technological progress and we should just figure out the way to include everybody in the benefits of it.’