The AI Optimization process is designed to help you optimize your territory account alignments with data-driven recommendations. You can then accept or reject those recommendations.
The territory you plan to optimize must have at least two child territories and at least one account aligned.
Also, if you want the AI optimization feature to consider any specific account fields as constraints, it can help with analysis if those fields are displayed in the Account workspace, as well as in the Alignments → Accounts workspace.