Machine learning has the potential to provide a non-traditional and feasible approach for solving Riemann problems to model the coupling effects of multi-material flows. However, most recent research on predicting Riemann solutions with neural networks is limited to addressing single-material flows and featured as the supervised learning, or is limited to solving specific problems and difficult to apply to a wide range of initial conditions. In this work, we explore physics-constrained neural networks, termed PCNN-RS, as multi-material Riemann solvers without any labeled data. Based on the frame of a general neural network, physics-constrained functions that conform to the shock/rarefaction relationships between initial states and interfacial states are constructed after the output layer, transforming the unlabeled output into a theoretically zero-valued functional form. This allows training learning models with standard loss functions solely using input data. The interfacial pressure of multi-material Riemann problem is predicted using the surrogate model, and other interfacial states can be directly derived through simple calculations. In addition, the basic principle of scaling of initial conditions and Riemann solutions with general equations of state is established theoretically. Based on this property, a transformation of input and output data is proposed to enhance the wide applicability of the Riemann-solver surrogate model. Furthermore, an optimization of samples is presented to reduce the training dataset and shorten the training time. The PCNN-RS is able to make accurate predictions, even when utilizing a compact neural network architecture with fewer neurons, and it is easily applied to the ghost-fluid-based sharp interface methods. It possesses the ability to simulate various interface evolutions for the interaction between two materials.