The Romans had to become more like Tacfarinas’s confederation of tribes, and so it began to fight him with tactics not dissimilar from his (Annales, III:73). They divided their army into three groups: a mobile force to chase the marauding enemy, a more defensive group tasked with protecting the villages of local populations, and an elite group of soldiers whose task was to occupy strategic chokepoints, passes, and roads. Even these three groups were subdivided into smaller companies led by experienced centurions. The broad goal was to make the Numidians as afraid of a raid as the Romans were, while at the same time limiting their mobility by fortifying potential targets and key roads.
In effect, the Romans decentralized their forces, dispersing them to counter Tacfarinas’s ability to spread the war. ...However, according to Grygiel, the Romans failed to follow up on victories, instead withdrawing troops after tactical successes. Nevertheless, the Romans eventually prevailed:
... in the end, the winner, Rome, succeeded not because it was militarily more powerful (after all, the bulk of the forces had been withdrawn to protect other imperial frontiers), but because it managed to become more like the enemy, surprising the rebels in a lighting strike. Surrounded by legionaries and deprived of most of his soldiers, Tacfarinas ran into Roman spears, avoiding capture, a humiliating captivity, and a certain death in the end anyway. His death marked “the end of hostilities.” (Annales, IV:25)While there are undoubtedly lessons to be learned, the key behind the Roman victory was ultimately the death of Tacfarinas. The same could be said of other rebellions against Roman rule that were extinguished when a charismatic leader was killed (or, for a more modern example, Tecumsah's fight against the United States). It is difficult to say whether ISIS is a movement centered around a charismatic leader that would disintegrate upon his death, but the Taliban certainly are not dependent on a single charismatic leader. As I've noted before, the key to victory against groups like the Taliban are to target those elements which are not mobile or elusive--the crops and villages upon which they depend for supplies. However, we lack the political will to relocate tens of thousands of villagers to internment camps, and raze the structures and crops left behind; and so victory is unattainable.