A useful local search state is any occupied-square subset , allowing temporary attacks. Let count unordered attacking pairs and . Maximize
ACTIONS can offer insertion at an empty square, deletion of an occupied square, and relocation of one knight to an empty square. RESULT is respectively , , and . Insertions and deletions alone connect the whole state space; relocation is a useful additional proposal.
Every conflicting state has , whereas the empty board has score zero. Every conflict-free state has score exactly its knight count. Hence every global maximizer is a maximum-size nonattacking placement. If a knight participates in conflicts, deleting it changes the score by , so a positive-conflict local stopping point cannot persist when improving deletions are considered.
From a random board, choose score-improving moves, with random restarts or occasional non-improving proposals to escape poor conflict-free local optima. A maximal placement is not necessarily a maximum placement: accepting only legal insertions can get stuck too early. This objective function defines the intended optimization precisely; a finite heuristic run still gives no general global-optimality certificate.

Articles by others on the same topic (0)

There are currently no matching articles.