BEDFORD, N.H. — After all the months of campaigning, advertising, and debating, the presidential campaign is coming down to scenes like this: Dianne Bzik and Betty HoSang, suburban moms who volunteered for President Obama, meander through neighborhoods and knock on doors, asking if residents need an absentee ballot or a ride to the polls or an answer to a last-minute question.

Hundreds of miles away in Ohio a nearly identical scene played out as Deb Voss and Karen Schreckenhofer canvassed a Cincinnati suburb for Mitt Romney. They too were carrying their cause door to door on an autumn afternoon.

Together, these campaign snapshots seemed like slices of American politics at its purest, a throwback to another, simpler time.

But it is the fruit of an extraordinary and very modern calculus as well, one backed by millions of dollars of political science research — and one that could well determine who becomes president. The campaigns of Obama and Mitt Romney have deployed their forces in the pivotal “ground game,” relying on enormous databases that include everything from car ownership to church membership, providing clues about which houses the door-knockers should target.

Globe reporters followed the ground forces of both candidates in two battleground states, New Hampshire and Ohio. What became clear is that both campaigns view the efforts of just a few years ago as outdated.

What once seemed revolutionary — setting up countless phone banks to reach every potential voter, blitzing mailboxes with fliers and the airwaves with commercials — now is viewed as seriously flawed. The noise is so great, the telephone calls so often ignored, and the commercials so frequent, that no one can be sure the message is getting out, or sinking in.

So, at Romney campaign headquarters in Bedford, N.H., in the heart of crucial Hillsborough County, the decision was made to go back to the future. The campaign says it has knocked on six times as many doors in New Hampshire as the John McCain campaign did in 2008. In Ohio, Republicans say they are going even further, knocking on 21 times as many doors as four years ago.

New Hampshire and Ohio are considered key by both campaigns but are different in many ways, illustrating the lengths to which Obama and Romney are adjusting their strategies from state to state.

New Hampshire, on paper at least, may not look like fertile ground for Obama. The president’s strongest supporters include African-Americans and Hispanics, but blacks make up only 1.3 percent of the state’s population, compared with 13 percent nationally, and Hispanics account for 3 percent, compared with nearly 17 percent nationally. Romney has a summer home in Wolfeboro and easily won the Republican primary in January.

Yet a few weeks ago, Obama was up by 15 points in a University of New Hampshire poll. Then, after Obama’s poor showing in the first debate, the margin eroded. The Romney campaign, which had been heavily outspent on television commercials, began buying airtime. A University of New Hampshire poll released last week found that Obama’s lead had been cut to 8 points, while an American Research Group poll surprised many by finding Romney ahead by 2 points.

Such a surge might be too late to carry the day in states with heavy early voting, but New Hampshire does not have early voting.

Moreover, New Hampshire encourages voters to show up on Election Day by allowing registration at the polls, whereas many other states shut down registration weeks ahead of Nov. 6. As many as 100,000 voters are expected to take advantage of the law allowing last-minute registration, which would set a state record. The result is that the old-fashioned business of getting out voters on Election Day is vital in New Hampshire.

In Ohio, meanwhile, the rules and demographics are different. It has nearly nine times the population of New Hampshire, with a black population close to the national average and a Hispanic population of 3.2 percent.

New Hampshire is the second-least churchgoing state in the nation and is socially libertarian, while parts of Ohio are more socially and religiously conservative. Early voting is crucial in Ohio, where at least 35 percent of voters are expected to cast ballots before Election Day.

Yet in both states, as in every battleground, it is widely believed that the race will be won by the campaign that can get out its voters. That truism is buttressed by some national polls that have shown Obama leads Romney among registered voters but is statistically deadlocked among “likely voters.”Continued...