The house always wins — and now it has artificial intelligence on its side.

Some of the world’s biggest casino operators in Macau, the Chinese territory that’s the epicenter of global gaming, are starting to deploy hidden cameras, facial recognition technology, digitally enabled poker chips and baccarat tables to track which of their millions of customers are likely to lose the most money, the Los Angeles Times reported.

The new technology uses algorithms that process the way customers behave at the betting table to determine their appetite for risk. In general, the higher the risk appetite, the more a gambler stands to lose and the more profit a casino tends to make, sometimes up to 10 times more.

The ability to identify customers with the potential to bet — and lose — big means that operators can offer special attention and targeted perks to keep them gambling. In a system from a German firm, Dallmeier Electronic, facial recognition alerts floor managers once a high-value customer walks into the casino or sits down at a table, allowing them to immediately dispatch staff to the customer’s side.

“Those who can afford to lose, those who play even more when losing money, we can for sure offer them a free meal,” said Andrew Lo, executive director of Macau junket operator Suncity Group Holdings Ltd. Suncity will use technology developed by Las Vegas-based Walker Digital Table Systems — which can invisibly track chips, wagers and game outcomes — at the casino it is building in Hoi An, Vietnam.

This embrace of high-tech surveillance comes as casino operators jostle for growth in a slowing industry that’s under pressure globally from economic head winds and regulatory scrutiny. In the world’s biggest gaming hub, where expansion is reaching its limits, two casino operators — the Macau units of Las Vegas Sands Corp. and MGM Resorts International — have already started to deploy some of these technologies on hundreds of their tables, according to people familiar with the matter.

Sands plans to extend them to an additional 1,000 tables, the people said. Three others, Wynn Macau Ltd., Galaxy Entertainment Group Ltd. and Melco Resorts & Entertainment Ltd., are in discussions with suppliers about also deploying the technology, according to the people, who asked not to be identified because they’re not authorized to speak publicly about the plans.

Suncity said it is planning to deploy a system in which radio-frequency identification technology, which attaches tags to objects, is installed on chips and tables, storing data on players. The gambling giants are motivated by the challenge of maximizing profits from the growing Chinese middle class, who stream into Macau en masse as it’s the only place in greater China where gambling is legal, the report said.

More than 3 million people visit the territory every month, from wealthy and focused bettors to families on short trips with grandparents and kids in tow. The advanced surveillance technologies give casinos a way of easily separating those who might become serious gamblers from those just having a fun weekend. It’s not unusual for casinos to have surveillance cameras for security and to detect cheating, with Las Vegas operators utilizing RFID-enabled chips that they can disable if they’re stolen out of the casino.

But these new technologies go a step further in tracking and rating every customer, building up a treasure trove of data. Sands China, the Macau arm of the world’s largest casino company, recently received approval from the territory’s gaming regulator to deploy the technologies, the people said.

Dallmeier Electronic worked with casinos to redesign cameras so they could be embedded into columns and not be visible to customers, said EP Smit, senior enterprise solutions manager for the Regensburg, Germany-based company. While the companies differ somewhat in the technology that they offer, the general setup is this: Gamblers’ betting behavior is tracked through high-resolution cameras and RFID-enabled poker chips and tables, with the intelligence gleaned from them flowing into a centralized database where a risk profile of the individual is created.

Macau’s regulator, the Gaming Inspection and Coordination Bureau, didn’t respond to emails and calls seeking comment.