Action perception as hypothesis testing