In a small laboratory tucked away on the second floor of BART’s Oakland headquarters, engineers are toiling at a project that has bedeviled the transit agency for years: a fare gate sturdy enough to stop cheaters.

No idea is bad, it seems.

As they chase the perfect barrier, the engineers are adding a panoply of new accessories to BART’s existing infrastructure. They’re testing plates shaped like shark fins that would stick up when the turnstiles close, to discourage people from vaulting over them. They’ve considered sloped tops that would make it harder to mount the steel cabinets. Or pressure plates to trace people’s movement, distinguishing the jumpers and piggybackers from strollers and bicycles that also jam the gates.

The winner, so far: gates with increased air pressure to “cinch” the wedges when they close, making them harder to pry open. BART is testing that model at Antioch, Pittsburg Center and Embarcadero, three stations that are known for heavy fare evasion.

Now Playing:

It takes brain power to solve an epidemic that siphons up to $25 million a year from the Bay Area’s backbone rail system. But it also takes money. BART is pursuing two strategies in tandem — modifying the existing gates for $20 million, or buying 600 new gates for $250 million. The board is expected to vote on a plan this spring.

Some board directors have elevated the issue of gate replacement to the top of BART’s agenda, despite all the associated challenges. The transit agency has yet to identify funding for the effort, which coincides with other expensive projects — BART is also overhauling its fleet, fixing 90 miles of track and installing a new train control system.

That doesn’t faze Director Robert Raburn, who noted the hidden cost of fare evasion: paid ridership dipped to 425,000 daily passengers last year, from a high of 440,000 in 2016. BART relies on fares for two-thirds of its operating costs and expects to collect about $485 million from riders this year. In a recent survey, riders made clear their dissatisfaction with the agency’s lack of progress in controlling cheats.

“I truly believe that fare evasion, cleanliness, crime and the impact of homelessness are all interrelated,” Raburn said. “The more we can keep people without a ticket on the other side of the barrier, the more we help our passengers.”

Back in the lab, employees work behind a thick industrial beige door, in a room crammed with all the furnishings of a BART station: fare machines; blinking signs; big steel consoles with pie-wedge stiles that snap open when someone inserts a ticket.

“We have a strong in-house maintenance staff that knows how to take these gates apart and rehabilitate them,” said John Yen, manager of the fare collection engineering division.

Gate rehabilitation might be the cheapest near-term solution for a galling number of fare-beaters. On an average day, 4 to 5 percent of all BART passengers have not paid. The highest concentrations of freeloaders seem to enter at the end-of-the-line stations, where people embark on longer, more expensive trips, and in the heart of the system.

Records from the centralized data system show that every day, 200 to 300 people force open turnstiles in the four downtown San Francisco stations. When officials stuck a camera over a heavily trafficked gate at Embarcadero two years ago, they counted 600 people pushing, squeezing, jumping and wiggling under the consoles in one day, Raburn said.

The scourge isn’t unique to BART. Across the country, scammers amount to 3 to 8 percent of all passengers on mass transit. Agencies have responded in different ways, with Metropolitan Transportation Authority board directors announcing a crackdown in New York, while council members in Washington, D.C., reduced penalties for fare evasion. When San Francisco’s Muni last measured the scofflaw problem in 2014, it hovered at the high end of the industry standard — 7.9 percent of passengers, and a loss of $17 million a year. The bus system currently employees 50 fare inspectors.

Two years ago, BART’s board opted to stanch the problem with enforcement, hiring a team of inspectors to roam the trains and stations and issue citations to riders who couldn’t show proof of payment. Last year, they issued 6,799 citations; police doled out an additional 2,668 for people caught bypassing their fare. In 2017, police issued 3,634 citations.

The inspection team recently expanded to work nights and weekends. At the same time, officials have begun emphasizing “station hardening”— moving elevators inside the paid areas, putting locks and alarms on swing gates and building taller, thicker barriers that people can’t pass through. That includes stronger fare gates, said Director Rebecca Saltzman.

“The ultimate goal is to have the stations be less porous,” she said.

For now, the engineers are working on cyborg-style innovations, and throwing many ideas at the drawing board.

“We thought about spikes,” Yen said, gesturing atop the steel consoles with a wry smile.

“We thought about a camera that looked like the gun turret from ‘The Incredibles,’ to really creep people out,” laughed Weldon Chen, senior computer systems engineer. The cartoon gun he described would drop from the ceiling to point at an intruder.

BART spokesman Jim Allison later stressed that these suggestions are jokes.

The serious concepts — shark fins, slopes and sensors — all come with challenges. Lab workers can’t make the gates too impenetrable, because each one has to process 30 customers a minute. They have to ensure that people with mobility issues, heavy luggage or baby strollers can pass through safely. And they’re somewhat constrained by BART’s contract with Cubic Transportation Systems, which doesn’t allow changes to the Clipper card reader or processing software.

It’s a bit like being trapped in a James Bond movie, Yen said. “The treasure is far away, and there are tons of obstacles in between.”

In the long term, BART will need to replace all 600 gates, which will probably deteriorate by 2030, Yen said.

With that in mind, a few officials took a field trip to Cubic’s San Diego offices in January.

The staff perused various models, including the “Iron Maiden” of New York — the revolving bars that come together like gnashing teeth —and long plexiglass panels that flip open when the fare is paid. Board President Bevan Dufty described their translucent design as a “disco-flavored” homage to the 1970s.

Not all of them fit the roomy look and feel of BART, Saltzman said.

“I think what we’re trying to stay away from is this feeling like you’re either trapped in the system or trapped out of it,” she said. “We may want to raise the barriers, but there are ways to do that that still fit aesthetically with BART.”

Dufty agreed.

“I mean really, there’s no fare gate you look at and say, ‘Well this is the nirvana of fare gates,’” he said.

That hasn’t stopped the engineering staff from trying.

Rachel Swan is a San Francisco Chronicle staff writer. Email: rswan@sfchronicle.com Twitter: @rachelswan