Learning to anticipate the actions of others: The goal-keeper problem