Conducting a war with robots is no longer in the realms of fiction but a real prospect. Starting from the axiom that thought precedes action, the thesis of this article is that consideration of the algorithms determining the individual and collective behaviour of robots must precede and inform the design of the devices themselves. The corollary of this idea is that ethical considerations must be incorporated into wider conceptual thinking on the subject.