Machine Learning of Implicit Combinatorial Rules in Mechanical Metamaterials.