Modeling Action Intentionality In Humans And Machines