Beneath the flashing lights, free cocktails and glitzy table games, casinos are built on a bedrock of mathematics, engineered to slowly bleed their patrons of cash. For years, mathematically inclined minds have tried to turn the tables by harnessing their knowledge of probability and game theory to exploit weaknesses in a rigged system. They may have come close, but they also might have missed the point: There is only one way to consistently win at a casino: Don’t play.

Successful casinos bring in billions of dollars each year for the companies, investors and Native American tribes that own and operate them. State and local governments also reap billions in the form of taxes, fees and other payments. The industry has grown from its roots in horse racing, which first gave rise to the term casino, to modern gaming facilities that include table and slot machines and large-scale resorts in places like Las Vegas and Atlantic City.

With so much money changing hands, both patrons and staff can be tempted to cheat or steal, in collusion with others or on their own. This is why casinos spend a lot of time, effort and money on security. The basics start on the casino floor, where employees keep a watchful eye on every table and window for signs of blatant cheating, such as palming or marking cards. Security workers in a separate room filled with banks of monitors have a broader view of the casino and can focus on particular suspicious patrons.