Pirates can wear gas masks. Flooding the deck of an autonomous ship with heavy gas has been discussed as a way to raise the barrier to entry for new piracy operations. An unresolved issue is how to reliably flush the bodies off the deck - one does not want to enter port (and foreign jurisdiction) with dead Somalians on board.