Machines developing free will on their own, or humans giving them something similar enough.
To answer the first, we must first answer how free will can appear on it's own.
To answer the second, I already did in my previous post.