Learning Game Representations from Data Using Rationality Constraints