Sonic black holes (SBH) in duct terminations consist of a set of inner rings separated by cavities whose inner radii typically decrease according to a power-law profile. The combination of profile shape and wall impedance is such that, in an ideal situation, waves entering the SBH would slow down without reaching the end of the duct, resulting in a perfect anechoic termination. However, in practice this is not possible and the reflection coefficient, although small for a broadband frequency range, characterizes the performance of the SBH. In this paper, we pose several optimization problems in an attempt to improve the efficiency of conventional SBHs. First, we present a general cost function with constraints for the weighted reflection coefficient of a SBH, to be minimized for each particular problem to be addressed. We start by optimizing the order of conventional SBHs and then take a step forward by allowing a free design for the SBH profile with a monotonic condition, but not restricted to the standard power-law decay. These two optimization problems are solved by a derandomized evolutionary strategy (ES) with covariance matrix adaptation, which can deal with multi-objective optimization problems very efficiently. On the other hand, the performance of the SBH can be improved by filling its cavities with absorption material. Therefore, for a limiting number of filled cavities that must not be exceeded, we find what is the best absorption distribution for the linear and quadratic power-law SBHs, as well as for the SBH with optimal profile found in the previous optimization problem. Each individual cavity can be either empty or filled with absorption material. Since the derandomized ES strategy is not suitable for problems with binary solutions, genetic algorithms are used instead. Finally, we perform a simultaneous optimization of the SBH profile and the absorption distribution with a loop combination of the derandomized ES and genetic algorithms. An important aspect of this paper is that the cost function is not viewed as an immutable quantity that always provides the best result for the physical problem at hand. Although the latter is true from a mathematical perspective, we show the effects of varying the weights and constraints of the cost function on the solutions and how these can give clues to improve existing designs and find new ones.