“Evolution may have introduced architectural changes in the brain, but cost functions are also a key factor in its operation.”