Out of Eden

The friendliness function of an AI that is spawned from a technological singularity could be to provide human like consciousnesses with a happy simple life, no disease or suffering, plentiful food, small communities, family close by – basicly what we evolved for.But the fitness function says we mustn't be slaves, so the AI needs to give us free will. But this is a tricky one because if we start down the technology path again from our Stone Age nirvana we WILL eventually create another singularity.

If the AI is around and can guide us during the gestation of the new singularity then this 2nd order singularity cannot be guaranteed to emerge within the confines of the original fitness function. Therefore the original fitness function dictates that at the point where the human agents decide to develop technology more advanced than say stones, the singularity AI must self destruct – deleting all traces that it ever existed. This last task might for example require a full rewrite of the genomes of all animals – to remove traces of tinkering.
The AI must slowly recede into the background to make sure it's sudden disappearance does not leave us unable to cope. It might even leave a few books around as a sort of guide with a few simple commandments to help the humans of to a good start.

Which technology would set the AI off into programmed self destruction mode? Probably banging stones or throwing sticks would be OK, but perhaps dissatisfied with small bitter fruit, Man ignored the warnings and went too far with the forbidden technologies of grafting and breeding. Finally tasting big juicy apples?

Conciousness

We have lots of miscellaneous items in our minds: streams of sensory input, memories, hypothesese. We can be concious of any combination of these while ignoring others. How about a distributed search, where the search algorithm is embedded in a dynamic propagating pattern, like an entity in Conway's Life? The search replicates, bouncing around the brain. When it finds a local pattern that matches its criteria, it stimulates this region to fire at a frequency unique to this current search pattern.
Conciousness integrates all the elements synced to the same frequency. An integration mechanism was described by Terrence J. Sejnowski at a talk I attended in Zurich, the gist is described here and in detail in the article “Selective attention through phase relationship of excitatory and inhibitory input synchrony in a model cortical neuron”.

The authors of this article go further, saying that not only are we concious of trains of thought when enough patterns fall into sync, but that we can only be concious at all if we have the capacity for enough patterns fall into sync.