The company’s software development costs — including salaries for the designers — have totaled nearly $6 billion over the last five years, and the company says it deducted all but a small amount of those expenses immediately. Companies that produce movies or compact discs, by contrast, face tighter restrictions which often require them to spread out the deduction on most production costs over a number of years. While video game makers have often compared themselves to movie companies when seeking tax incentives, the game developers’ ability to write off the vast majority of their development costs immediately gives them a substantial financial advantage over other entertainment companies in taxes and cash flow.

Video game companies also get other research-related breaks. In 1981, as Americans worried that Japan’s growing dominance in the auto business would be followed by a decline of the high-tech industry in the United States, Congress added another research and development credit, this time specifically for companies that increased their R.& D. spending from the previous year. The hope was that by encouraging companies to invest more in research, the private sector might create the next Bell Laboratories and inspire the kind of technological breakthroughs that benefit society as a whole.

Within a few years, the credit was being claimed by businesses with little technological background — fast-food restaurants, hair stylists and fashion designers. So Congress tried to restrict what research would qualify. The credit was denied for social science research and marketing. The narrowest definition, proposed by the Clinton administration, was to allow the credit only for research that produced an actual innovation, but that measure met determined opposition from business lobbyists. By the time the Treasury Department ruled in 2002, an appointee of President George W. Bush decided to drop it.

“It seemed as though it would be impossible to enforce,” said Pamela F. Olson, then the assistant secretary for tax policy, and now a tax lawyer at Skadden, Arps, Slate, Meagher & Flom. “Because you couldn’t be certain that someone wouldn’t come back later and challenge things, by saying that what seemed like an innovation at the time had actually been discovered before.”

The failed attempts to restrict the R.& D. credit to basic research have been a boon for video game companies. Even when companies are merely creating new versions of existing games — conducting research that would have little value to anyone but themselves — their development processes usually involve enough experimental uncertainty to qualify for the tax break.

During the last five years, Electronic Arts has claimed tens of millions in tax savings from research and development credits for its various games, according to the company’s regulatory filings. (Company officials declined to specify how much of that total came from the federal government.)

At the same time, the I.R.S. and the United States Tax Court have denied the credit for some projects that would have benefited the community as well as the companies receiving it. In 2009, for instance, the federal tax court denied Union Carbide’s attempt to claim a research and development credit for its project to reduce the pollutants released from the smokestacks of a refinery in Louisiana. Union Carbide failed to meet the experimental threshold for the credit, though video game makers often seem to have little trouble meeting the requirement.