If you know the precise state of each motor in a robot hand, you can compute the absolute position of its fingertip, right?
To make a robot play piano, you need to solve the reverse problem of it i.e. to compute the motor states from the target robot position. This problem is called "Inverse Kinematics" and not fully resolved to this day.
Reinforcement Learning (RL) people claim that, if you let a robot move randomly, and give it apporopriate rewards depending on the resulting state, eventually it learns to solve the problem by itself (just like a human baby eventually learns how to walk through trial & error).
Now, you are looking at the state of the art of RL in 2023.