Acoustic metasurfaces have shown great promise for applications in many acoustic wave modulation fields, while the use of intelligent optimization algorithms has facilitated the design of acoustic metasurfaces. In this paper, we utilize the stop band properties of phononic crystals to design a metasurface that can achieve both trans-mission focusing and reflection focusing, as well as a metasurface that utilizes acoustic focusing to filter the incident acoustic wave. In order to achieve the best effect, this paper uses the taboo genetic algorithm to optimize the arrangement order of the structural units controlling different focuses in the acoustic metasurface, and the optimization achieves a good focusing effect, which expands the design of acoustic metasurfaces as well as the application scenarios of acoustic focusing.