Randomized algorithms are particularly useful when faced with a malicious "adversary" or attacker who deliberately tries to feed a bad input to the algorithm (see worst-case complexity and competitive analysis (online algorithm)) such as in the Prisoner's dilemma.
Randomizirani algoritmi su naročito korisni kada se suočavate sa zlonamernim "protivnikom" ili napadačem, koji namerno pokušava da "nahrani" loš ulaz u algoritam (pogledaj kompleksnost u najgorem slučaju i konkurentna analiza (online algoritam)) kao što je Dilema zatvorenika.