If it’s programmed, it isn’t free. We have free will because we have rational souls. A robot can’t “choose” anything; it can only execute commands, be they simple or complex. A robot can’t choose to disobey a command. It’s the essence of free will that it isn’t programmed.
Okay, I’ll just program it to pray and ask the Lord to give it a soul and free will. Maybe limited free will.