Values are the foundation of a person’s ability to judge between right and wrong. And are the results of their experiences and their worlds and would be very difficult to teach. The populations whose morals lean towards contributing and compassion are vulnerable to the morals leaning towards selfishness and apathy. Maybe AI will take over before the more destructive population does.
An algorithm of currently available memories, sounds so simple, oops then toss in love, hate, etc. Maybe your algorithms just get skewed, behavior gets skewed, outcomes get very unpredictable, causing more skewed algorithms all around.