"A Short History of World War LXXVIII", a short story by Roy L. Prosterman in Analog Science Fiction/Science Fact, April 1977.
Man's reached a point where bloodshed and loss of life are no longer necessary to settle conflicts. Instead, all disputes are settled through an annual combat held on the surface of the moon, using the best combat machines each nation can come up with.
"But, after the indescribable ravages of World War III, it had become clear that human survival demanded a wholly different approach to conflict. Fortunately, perhaps essentially, this realization coincided with the development of machines that were far superior in every way to human operators in carrying out acts of destruction. Even two hundred years ago"—here sections from an ancient communication called "Newsweek" and made, apparently, of cloth or some similar substance, flashed upon the screen—"technicians were talking about the possibility of an 'Automated Battlefield'." Here, computer animation took over, showing a series of still rather primitive machines confronting one another on a field. There were explosions, grindings, and tearings. Drones hummed through the air. Many of the machines disappeared. There were no humans present.
[. . . .]
"Initially, in World Wars IV through VIII"—here the screen switched to tri-di images, of juggernauts assailing one another against a barren landscape—"remote areas of Earth were used for purposes of combat.
"After 2025, however, it became possible to transfer the situs of fighting to Luna, and this is where all subsequent wars have been fought." The screen cut from sleek, complex juggernauts belching and clashing on remote Earthscapes, to similar scenes, cut and interspliced, on bleak, level Moonscapes.
The protagonist's team manages to prevail, when they managed to use an attack as a feint, with the real attack being a swarm of microscopic machines (they did not use the term nanites) that destroyed the opposing machine from the inside.
What won it for the Usa, as we later discovered, were the "brain eaters."
Amidst all the thudding and flashing, a hatch had winked open on the hidden side of the sphere, and ejected a vast number of tiny spheres, outwardly looking like Plasticorp scale models. Inwardly, they were something quite different.
Deploying in a great arc, they had slowly rolled toward the Saudi hemisphere—when it moved, they followed. Most were scorched or blasted, but a few, coming within a click of the enemy, dissolved. And became a series of still smaller spheres, crawling slowly towards their target. Most of these, too, did not reach it. Most of those that did were fried or thrust away.
But a few, very few, found momentary orifices where there were weapons being discharged or locomotion being arranged. They darted inside.
[. . . .]Steadily they multiplied, steadily they catalyzed, steadily they consumed their favored environment. When they reached the limit that environment would support, they died, or inactivated.
Contrary to popular belief, they did not "eat" the Saudi computer. They simply "ate up" the supercooled helium on which it depended for continued efficient operation—and turned it, and the lubricants, and all the ambient fluids and gases, to something else. Ethereal glop. Computers were built to work in cold helium, not ethereal glop. Biologically or chemically active, therefore relatively "hot" glop. The Saudis were ethereally glopped.
I am almost 100% certain this was in a sci-fi magazine, not an anthology.
As far as the ISFDB knows, the story has never been reprinted.