Category learning through action: A study with human and artificial agents