Abstract: Mechanical metamaterial actuators achieve pre-determined input–output operations exploiting architectural features encoded within a single 3D printed element, thus removing the need for assembling different structural components. Despite the rapid progress in the field, there is still a need for efficient strategies to optimize metamaterial design for a variety of functions. We present a computational method for the automatic design of mechanical metamaterial actuators that combines a reinforced Monte Carlo method with discrete element simulations. 3D printing of selected mechanical metamaterial actuators shows that the machine-generated structures can reach high efficiency, exceeding human-designed structures. We also show that it is possible to design efficient actuators by training a deep neural network which is then able to predict the efficiency from the image of a structure and to identify its functional regions. The elementary actuators devised here can be combined to produce metamaterial machines of arbitrary complexity for countless engineering applications.