Adapting Swarm Intelligence for the Self-Assembly of Prespecified Artificial Structures