In this paper we present a genetic algorithm-based approach towards designing self-assembling objects comprised of square smart blocks. Each edge of each block can have one of three polarities (+1, -1 or 0) which defines how blocks stick together opposite charges attract, like charges repel, and a 0 face neither attracts nor repels. In addition to this property, the block contains an internal state machine which can change the polarity of any number of its sides following the detection of an "event". The aim of this work is to evolve block parameters which allow the self-assembly of desired basic structures that can be used as primitive building blocks for the assembly of more complicated objects. We detail a genetic algorithm-based approach towards evolving the state machine logic, with a fitness measure based on the difference of the final shape from some desired goal or target shape. The experimental results show that the genetic algorithms can find optimal rule sets and ...