WILLIAMSBURG, VA. -- Karl Marx said history repeats itself -- first as tragedy and then as farce. Gary Hart has inverted Marx's dictum, once again doing things his own way. His campaign, which collapsed in farce, has come back as tragedy. If ideas and intellect were the keys to the White House, Hart should walk right in. Given the Donna Rice affair, though, he will have to settle for a visitor's pass.

It's hard to say if Hart is so good or the rest of the field is so bad. But in the recent debates, such as the one here, Hart and Jesse Jackson were the only candidates to exhibit a world view, what the Germans, in a more philosophical context, call Weltanschauung. In contrast, the other candidates either emphasize one theme -- usually a gimmick such as trade barriers -- or answer each question as if the issue were connected to nothing else.

Take the question of an oil import tax. Characteristically, Hart proposed one years ago. To Richard Gephardt and Mike Dukakis, this is an economic issue -- as indeed it is. They took different sides. Gephardt says the money Americans spend on oil is going abroad and low prices discourage domestic production. Dukakis says the average American would have to foot the bill for such a tax. They are both right, which is often the case. If these issues were simple, they would be settled by now.

But only Hart seemed to know that something else was involved -- national security. Trying to be heard as Dukakis and Gephardt by their sniping confused nastiness with leadership, Hart interjected, "No, the issue . . . is not economic. If you are opposed to that {an oil import tax}, you are willing to risk young American lives to fight for that oil."

It was a typical Hart performance. At the moment, the United States has a flotilla in the Persian Gulf, and as long as that's the case, the chance of broader hostilities exists. Unlike other candidates, Hart was using his noodle to think past the immediate situation, to conceive of a way to make the United States less dependent on foreign oil and, therefore, less likely to use force to protect energy sources.

In contrast, the other candidates -- Democratic and Republican alike -- seem to view issues as isolated matters. Dukakis would attack the budget deficit by collecting taxes that now are not being paid. As a deficit reduction plan, it's a wish bordering on a joke -- an auditor's version of a program. Gephardt's fixation is trade, surely an important subject, but one that he has couched in chauvinistic terms as if tariffs alone stood between the United States and reclamation of its past. Albert Gore seems to be running for secretary of defense -- and then maybe only of the Old Confederacy.

With the exception of Hart, only Jackson has the ability to relate one topic to another. But his Weltanschauung -- Third World-oriented in foreign policy, directed to the less fortunate in this country -- lacks precision. The gears slip between goals and programs, but at least with Jackson you have the sense that a package exists.

For all his troubles, even a humbled Hart sets a standard for the other candidates. For one thing, Hart has abjured the wisecracking that's designed to catch the eye of TV news directors. The other candidates seem addicted to it. Like tired vaudevillians, they go from city to city, pulling the same jokes and accusations out of their sleeves. For instance, in almost every debate the 39-year-old Gore will somewhere sneak in his line that John Kennedy, the youngest president, replaced Dwight Eisenhower -- up to Ronald Reagan, the oldest. Get the hook, pleeze!

As for the Republicans, they are no better. Bob Dole has the world view of an assembly line legislator. He will deal with each bill as it comes to him. Vice President Bush not only lacks a philosophy, it's not even clear he's ever had an original thought -- or, if he did, he whispered it to President Reagan and now it's a state secret. Only Jack Kemp operates out of a set of convictions, all of them connected to economic views that, unfortunately, are not connected to reality.

The tragedy of Hart is not that the Rice affair doomed his candidacy. His intellect, his ability to think conceptually, was always marred by personality quirks that came to be called the character issue. But Hart said he returned to the presidential race because none of the other candidates was saying what needed to be said. The Williamsburg debate and some others prove they're not listening, either. That's the greater tragedy.