Similar Items: Synthesis of Strategies Using the Hoare Logic of Angelic and Demonic Nondeterminism