How to make an enemy AI agent for your top-down games

Oh YEAH! I forgot to mention that this AI is a bit broken as well...

The project is unshared...for now.