Prime Minister Margaret Thatcher unleashed another tough verbal assault on Britain's striking coal miners today even while hopes rose in London that a chance for settling the bitter, 31-week-old dispute might be evolving.

In a surprise move, Ian MacGregor, leader of the state-run National Coal Board, said he would accept a new compromise formula for ending the walkout proposed this week by the independent Advisory, Conciliation and Arbitration Service.

The formula still would leave with the coal board, which represents the government-owned coal industry, the final decision about when pits that are no longer economically viable can be closed. But it provides for an independent advisory committee to hear other views from mining communities and make recommendations to the board.

Officials of the striking National Union of Mineworkers, who oppose any pit closure as long as there is any coal left in the ground, challenge the coal board's right to make the final decision.

If a settlement is in the wind, however, there was no sign of conciliation in Thatcher's address today before her ruling party's annual convention here.

Indeed, tonight the mineworkers said that the compromise proposal was unacceptable, and that they would submit new proposals. There was no indication that Thatcher's tough speech had anything to do with the mineworkers' decision.

Speaking this afternoon, just 12 hours after an IRA terrorist bomb exploded in her hotel here, Thatcher depicted as "thugs and bullies" the more militant strikers who are organized into illegal "flying squads" that go from one picket line to another.

"If their tactics are allowed to succeed," she said, "we shall see them again at every industrial dispute organized by militant union leaders anywhere in the country."

Thatcher warned delegates and a national television audience that "what we have seen in this country is the emergence of an organized revolutionary minority who are prepared to exploit industrial disputes but whose real aim is the breakdown of law and order and the destruction of democratic parliamentary government."

In an effort to separate the miners on the picket lines from the rest of organized labor, Thatcher said, "We must not forget that the overwhelming majority of trade unionists, including many striking miners, deeply regret what has been done in the name of trade unionism. When this strike is over, and one day it will be over, we must do everything we can to encourage moderate and responsible trade unionism," she said.

On defense and attitudes toward the United States, Thatcher drew sharp verbal distinctions between her party and the opposition left-of-center Labor Party, which met last week in Blackpool.

Labor plans to get rid of British and American nuclear weapons and the bases for them "would wreck NATO and leave us totally isolated from our friends in the United States. And they are our friends," she emphasized to considerable applause.