Even if I don’t know how freewill started I can speculate how we can understand it in its simplest form.
The simple answer is machine learning. I speculate that with machine learning you can predict,recognize and generate realistic looking actions. The difficult thing to understand is that this is also true for the timing of those actions.
So with machine learning you could generate ”Freewill Realistic Actions” at timings that are also realistic.
So when will you drink your coffee? Timing is important. People will recognize freewill actions because of how accurate and realistic the timings were.
Basically if a robot has human like timing. It will be perceived as having freewill. So is the guess anyway.