The first step is to try and understand the evolutionary purpose for discrimination, racism, prejudice and patriotism. I speculate that 3 billion years ago a gene was introduced into the genome that changed behaviors or genetic belief systems. This gene halted the ability to give everything away and without it we would not be here today. With that said, it could be that we are unconsciously driven by genetic belief systems and our decisions are genetically predetermined.
There is some evidence that we are coming out of that early stage of evolution and just starting to take the first baby step to becoming an intelligent species but it is still a long way away. If human intelligence is relative to its population size, I would estimate that human intelligence may be achieved when we reach 14 billion. Until then all our decisions and actions could only be considered as mechanical not intellectual.
One great example of how our beliefs are mainly genetic is the prion disease. There are several types mad cow type diseases each one is species specific (will not jump species) its purpose is to stop a species from being cannibalistic. If this disease did not exist life would not have advanced. The other important prion disease is called Alzheimer's, It stops people that might think that they are intelligent from spreading bullshit to the next generations.