Adding retries for AI and fixing local_reward to zero for finished boards