Metamaterials are constructed from regular patterns of simpler constituents known as unit cells. These engineered metamaterials can exhibit exotic mechanical properties not found in naturally occurring materials, and accordingly they have the potential for use in a variety of applications from running shoe soles to automobile crumple zones to airplane wings. Practical design using metamaterials requires the specification of the desired mechanical properties based on understanding the precise unit cell structure and repeating pattern. Traditional design approaches, however, are often unable to take advantage of the full range of possible stress-strain relationships, as they are hampered by significant nonlinear behavior, process-dependent manufacturing errors, and the interplay between multiple competing design objectives. To solve these problems, researchers at UC Berkeley have developed a machine learning algorithm in which designers input a desired stress-strain curve that encodes the mechanical properties of a material. Within seconds, the algorithm outputs the digital design of a metamaterial that, once printed, fully encapsulates the desired properties from the inputted stress-strain curve. This algorithm produces results with a fidelity to the desired curve in excess of 90%, and can reproduce a variety of complex phenomena completely inaccessible to existing methods.