The Republican-controlled Congress is poised to pass a tax bill riddled with ambiguities, loopholes, and giveaways. The rules draw new lines that favor some taxpayers but not others — and in many cases the bill creates these preferences for no discernible policy reason.

Last-minute additions to the bill stripped out a few peculiarities — an earlier House version would have let business owners lower their taxes just by limiting their active involvement in the business, for example — but final negotiations also brought new and unexpected benefits.

Tax advisers and their wealthy clients will exploit these rules, and it will be difficult, and in some cases impossible, for the IRS to police the line between permissible creativity and illegality.

Such maneuvers are almost certain to increase the cost of the legislation beyond the current estimates of more than $1 trillion, because of the revenue lost as taxpayers cleverly reorder their affairs.

Two changes in particular will let a hundred tax games bloom. First, reducing the corporate tax rate to 21 percent, the centerpiece of the bill, opens the door for taxpayers to use corporations as tax shelters for their labor and investment income. (Labor income will face a maximum rate of 37 percent, down a bit from the current 39.6 percent)

Second, the new pass-through deduction will allow certain business organized as LLCs, partnerships, and sole proprietorships to escape tax on 20 percent of their qualifying business income. Regular business income earned through a pass-through was previously taxed at the individual rates.

The upshot of all this: The 37 percent top rate is just a sticker-price for the wealthy and well-advised, up for negotiation. Everyone else will still pay full-price.

One caveat: The tax law includes a few rules designed to prevent some of the most egregious abuses. But many of those rules include enough gray areas that that IRS will be hard-pressed to police them, especially since the agency is understaffed after years of budget cuts.

1) Incorporate yourself

Under the new law, the top ordinary rate on labor income will be much higher than the top rate on corporate income. As a result, many taxpayers will be able to shield a portion of their labor income from tax by setting up a corporation. So Joe Smith, previously an assistant account director for a PR firm, can become Joe Smith, Inc., a new startup company! The firm makes payments to the new corporation instead of to Smith. Thus, Smith shields his labor income from the higher individual tax rate.

The IRS might investigate whether the new corporation pays Smith a reasonable fee for his services, which some tax-law precedents suggest it is obliged to. That’s one check against this tax dodge, and there could be others. But how many new corporations can the IRS investigate? And if Smith can find a few friends to join his new corporation, it will be even harder for the IRS to challenge.

2) Use a corporation as a tax-sheltered piggy bank

Under the new law, you can also create a corporation and use it to shelter investment income — like the interest paid on bonds — from tax. If the corporation holds the investments, rather than an individual, the resulting investment income will be taxed at the lower corporate rate.

If the taxpayer cashes out by taking a dividend from the corporation (or selling the corporate stock, triggering capital gains) a second individual layer of tax would apply (i.e., a capital-gains or dividend tax); this also applies in the self-incorporation scenario, above. But the combined effect of the new corporate tax rate and the tax on dividends is still less than the top individual rate if the income was earned directly, so those playing this game still win.

Taxpayers can also avoid the dividend or capital gains tax entirely by holding the corporate stock for their entire life. Heirs are typically shielded from taxes on undistributed corporate profits earned before the death of the previous stockholder.

To be fair, these two games with corporations have been known for decades. There just wasn’t much of an incentive to engage in them when the corporate rate was higher. Now they’ll come back. Current rules will curb some abuses (one rule attempts, and mostly fails, to limit the amount of earnings a corporation can accumulate without distributing the earnings to shareholders), but there will be plenty of room for creative play.

3) Take your job and shove it (and create a pass-through)

As mentioned, under current rules people who earn income via a pass-through business pay tax at the individual rates. But under the Republican bill they first get to deduct part of this income. That means — surprise! — new pass-throughs will blossom as more taxpayers will redefine their work as a business instead of a mere wage-earning job.

Many independent contractors and members of a partnership automatically qualify for pass-through status. So expect to see workers giving their bosses two weeks’ notice and reentering the workforce as independent contractors and partners in their own firms.

4) Change your profession (slightly)

In hopes of cutting down on abuse of the pass-through deduction, Congress restricted the ability of some providers of “specialized services” from getting the new pass-through deduction. This list of service-providers includes doctors, lawyers, performing artists, and athletes. High-earners in the listed fields — those with taxable income above $157,500, or twice this amount for a married couple— cannot claim the pass-through deduction; they can’t quit and redefine themselves quite so easily.

Curiously, the final bill removed architects and engineers from this list, for no clear policy reason. (Does Congress think our country has too many doctors and not enough architects?) And a note for students: If you’re on the fence about your major, now might be a good time to change it.

But with a bit of creativity, professionals on the list can still access the pass-through deduction. Sure, a lawyer at a law firm is out of luck, because she provides legal services to customers, but she might leave the firm and provide those same services in-house, say, at a real-estate firm. Now she’s no longer in a “specified service” — she’s in the real-estate business. Voilà: She may qualify for the pass-through deduction.

5) Fire your employees and replace them with robots

A controversial last-minute rule could encourage some businesses to fire their employees and replace them with machines. The original Senate bill limited the availability of the pass-through deduction to 50 percent of wages paid out by the firm.

To the surprise of many, the final bill permitted firms to also claim the deduction by purchasing machinery — or making other capital expenditures instead of by paying employees. The businesses can even borrow to acquire the needed capital and still claim the benefit.

Of course, the decision whether to hire employees or to replace them with machines is complicated and industry-specific. And in some industries capital investment can increase, rather than replace, labor productivity. But what is clear is that the addition of the new rule — and other incentives in the bill, such as generous new deductions for machinery purchases in general — put a thumb on the scale in favor of the robots.

Skeptical that Congress would include a pro-robot rule in a bill supposedly about job creation? The conference report accompanying the bill states explicitly that a fully automated factory (producing “widgets,” of course) would benefit from the pass-through deduction.

6) Monetize your reputation

In addition to the disfavored professionals on the “specified service” list, businesses are denied the pass-through deduction if their “principal asset” is the “reputation or skill” of an employee. The goal was to prevent a celebrity or athlete, for example, from spinning off their brand into a separate business.

That makes the gamesmanship harder but far from impossible: Such taxpayers might combine their brands with just enough other business activities that the IRS can no longer claim the reputation is a principal asset. For example, the actress Gwyneth Paltrow uses her reputation to sell face lotion and wellness products through the “goop” brand. “Goop” is not just about her brand, and not just about lifestyle products. (And technically it’s a corporation, not a pass-through.) But now many other boldface names could follow her lead.

7) Be Donald Trump

This strategy is admittedly hard to pull off, but it pays off bigly. The tax bill is laden with benefits for, yes, a theoretical extremely wealthy taxpayer in the real estate industry. The combination of a vitiated estate tax (the exemption amount doubles to more than $20 million for a married couple), and the continuation of rules that shield heirs from taxes on investment income earned during the decedent’s lifetime mean that such a taxpayer could save millions of dollars on their tax bill alone.

The same last minute change that could accelerate automation will also enrich real estate investors, who generally have a lot of invested (or borrowed) capital, and relatively few employees. Also, the pass-through benefits apply automatically to real estate investment trusts commonly used in the industry. Nice work if you can get it.

When the tax code draws lines and picks favorites, tax game are inevitable. And this bill picks lots of favorites. Meanwhile the IRS will be playing defense with its hands tied.

Ari Glogower is an assistant professor of law at the Ohio State University Moritz College of Law. This piece draws on two reports written by Glogower and a dozen other lawyers and tax experts: “The Games They Will Play: Tax Games, Roadblocks, and Glitches Under the New Legislation,” and an updated sequel. Find him on Twitter @AriGlogower.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com