Learning joint affordances of target and tool