Optimization Algorithms In Physics