Can Free Will Be Programmed?

Artificial Uncovered - A podcast by Bernie Su

Can a machine make choices outside its programming? How do you differentiate between an act of free will and a mere bug in the programming?