I've been playing for a while now and I think I have the new detection working pretty well. And it uses the X/Y-to-grid-coordinate function only once, instead of 6 times per iteration (the AI has 16*20 to 40 iterations to figure out a move). So it should be a lot easier on PD's CPU