(CNN) -- The U.S. Navy is getting ready to "swarm" its adversaries.
The Office of Naval Research over the weekend released video of tests conducted in August that showed five "drone" boats swarming a vessel that posed a threat to a Navy ship.
"The U.S. Navy is unleashing a new era in advanced ship protection," the service says in the video.
Controlled by what the Navy calls Control Architecture for Robotic Agent Command and Sensing (CARACaS), a sensor and software kit that is transferable among small vessels, a fleet of more than a dozen small unmanned boats cruise along the James River in Virginia, setting up a protective screen on a Navy research ship.
When a threatening vessel is detected, five boats break off to confront it.
"If I was the actual target it would be pretty intimidating to see five boats rushing at me," Sam Calabrese, pilot of the "bad guy" vessel, said in the Navy video.
One developer likened the robot boats to "guard dogs" that could swim around a warship and detect threats before they come within striking range. And like dogs, the robot boats actually think for themselves, with their software choosing the best route for each boat to confront a threatening vessel.
The drone boats could be armed to fire on adversaries, but fire control would come from a sailor on an accompanying warship.
The system also allows the Navy to save money because no special boats have to be built to deploy it. The boats used in the August demonstration came from inventory now carried on Navy warships, the Navy video said.
"Any boat can be fitted with a kit that allows it to operate autonomously and together swarm on any threat," the video says.
The CARACaS software was originally designed for NASA's Mars rovers, the Navy video says, and adapted for use by small boats.
The Navy released the video just a week before the 14th anniversary of the terrorist attack on the destroyer USS Cole in Yemen that killed 17 American sailors. The Cole was attack by a small boat packed with explosives which blew a 40-foot-by-60-foot hole in the side of the destroyer when detonated.
It's the kind of attack Navy officials think a swarm of unmanned surface vessels, or USVs, could prevent without putting any sailors in harm's way.
"While the attack on Cole was not the only motivation for developing autonomous swarm capability, it certainly is front and center in our minds, and hearts," Rear Adm. Matthew Klunder, chief of naval research, said in a statement. "If Cole had been supported by autonomous USVs, they could have stopped that attack long before it got close to our brave men and women on board."
The Navy release says swarmboat capabilities could also play a role in protecting U.S. ports. The U.S. Coast Guard was part of the tests the Navy carried out in August.
The Navy did not give a date for when the system could be deployed in the fleet.