It tries to avoid getting units killed by blade danger in general. But if you fork there's nothing it can do, and also it doesn't look too far into the future.
follow up: at difficulty 30 does AI do better? or did I just get an unlucky enemy formation
no, the AI is all the same level