attack algorithms