# Solution to Ideal Acceleration Pathfinding

I'm currently developing a video game for fun, and I got stumped on a particular physics problem while making the enemy movement mechanics. I'm wondering if anybody can help me out. In this game, the enemy is meant to chase the player while exhibiting an acceleration of constant magnitude but varied direction. My question is that for a particular enemy position <Ex, Ey>, initial enemy velocity <Vx, Vy>, acceleration magnitude A, and player position <Px, Py>, what is the ideal enemy acceleration vector to guarantee collision with the player (assuming player position is static)?

$$E_x+V_x\,t+\frac{1}{2}A_x\,t^2=P_x$$ $$E_y+V_y\,t+\frac{1}{2}A_y\,t^2=P_y$$ $$A_x^2+A_y^2=A^2$$
You have three nonlinear (quadratic) equations for the three unknowns $A_x$, $A_y$, and $t$. Solve these and you're good. The system is polynomial and there's decent numerical algorithms to find a solution if one doesn't have a better idea. I need to go, so I'll let somebody else figure out a more elegant way to find the solution... ;-)