There is some speculation that the last common ancestor between us and fruit flies preceded the evolution of brains. If correct this means brains have evolved independently at least twice.