Nonlinear Programming Techniques for Equilibria