We review and extend the Alexandrov–Kontsevich–Schwarz–Zaboronsky construction of solutions of the Batalin–Vilkovisky classical master equation. In particular, we study the case of sigma models on manifolds with boundary. We show that a special case of this construction yields the Batalin–Vilkovisky action functional of the Poisson sigma model on a disk. As we have shown in a previous paper, the perturbative quantization of this model is related to Kontsevich's deformation quantization of Poisson manifolds and to his formality theorem. We also discuss the action of diffeomorphisms of the target manifolds.