AI works perfectly, edge error resolved (still no end game though)