A Game-Theoretic Learning Model Connecting Nash and Stackelberg Equilibria