This thesis conceptualizes and implements a new framework for designing materials that are far from equilibrium. Starting with state-of-the-art optimization engines, it describes an automated system that makes use of simulations and 3D printing to find the material that best performs a user-specified goal. Identifying which microscopic features produce a desired macroscopic behavior is a problem at the forefront of materials science. This task is materials design, and within it, new goals and challenges have emerged from tailoring the response of materials far from equilibrium. These materials hold promising properties such as robustness, high strength, and self-healing. Yet without a general theory to predict how these properties emerge, designing and controlling them presents a complex and important problem. As proof of concept, the thesis shows how to design the behavior of granular materials, i.e., collections of athermal, macroscopic identical objects, by identifying the particle shapes that form the stiffest, softest, densest, loosest, most dissipative and strain-stiffening aggregates. More generally, the thesis shows how these results serve as prototypes for problems at the heart of materials design, and advocates the perspective that machines are the key to turning complex material forms into new material functions.