Torthaí cuardaigh - binary whole optimization algorithm