Search and optimization algorithms