New algorithm predicts Daesh attacks