Thanks so much for your help IsometricRobot!
It didn't fix my issue but I managed to halve my AI code after your suggestion twigged an idea.
Subsequently I found the freezing issue which had nothing to do with the AI, lol. I must have dragged a condition to the front of the script which stopped progression when the player 1's turn was up.
Now I can start debugging the AI without the script freezing! Thanks so much again, I'll remove the capx from Dropbox now because I should be OK from here on!!!