Methods and systems for the evolution of electronic neural assemblies toward directed goals. A compact computing architecture includes electronics that allows users of such an architecture to create autonomous agents, in a real or a virtual world and add intelligence to machines. An intelligent machine is composed of four basic modules: one or more sensors, one or more motors, a (Reward Input Output System) RIOS, and a cortex. A number of genetically evolved detectors can project both to cortex and RIOS. At first the neurons within the cortex evolve to predict the structure of the sensory data followed by the structure of proprioceptive activations of its own motor system. Finally, once the cortex has learned its sensory and motor programs, it evolves to predict the reward signals, which comes in multiple channels but is dominated by the detection of the acquisition of free-energy.