The design of brains requires that we know what a brain is. Nature is the flow diagram for everything that has a brain. Brains mediate between sensors and motors. Brains can be classified exactly as to size.
Sizes range from the null brain, zero, to brains the size of the universe.
It should be noted that interesting machines can be made with null brain. Hook sensors to motors directly and you have a machine with no brain. Motor The simplest possible brain is a simple inverter. The first complex brain is two sensors to one motor through a brain HalNode. It is easier to write this as an algebra.