SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.04063 · 2019

Exploratory Combinatorial Optimization with Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 0 failures of our instrument; 10 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1909.04063.json · badge: /api/ran/1909.04063.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ilBarbara/BioRL community (classifier label)
classifier basis not recorded on the link
10 ran · 10 no recorded run
FunctionStatusWhere it lives
adj_dict_to_lists Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/mutation_data.py
code served (permissive licence) · get_code("ebb92c545dd37c5e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# xs: a list of x values (keys from the dictionary)
xs = ['a', 'b', 'c']

# ys: a list of y values (all possible values that could appear in dictionary lists)
ys = ['apple', 'banana', 'cherry', 'date']

# d: a dictionary mapping x -> list of y values
d = {
    'a': ['apple', 'cherry'],
    'b': ['banana'],
    'c': ['apple', 'date', 'banana']
}

ARGS = {
    'xs': xs,
    'ys': ys,
    'd': d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
call_multidendrix Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/utils.py
code served (permissive licence) · get_code("e3297cca27fd41f9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Create a mock MultiDendrix class that implements the ILP method
class MockMultiDendrix:
    def ILP(self, mutations, t, k, k2, alpha, delta, lmbda):
        # Return a list of (geneSet, W) tuples
        # geneSet is a list of gene names, W is a weight
        return [
            (["GENE_A", "GENE_B", "GENE_C"], 0.95),
            (["GENE_D", "GENE_E"], 0.87),
        ]

# Create mock mutations data structure
# This should be compatible with what MultiDendrix.ILP expects
mutations = {
    "patient_1": ["GENE_A", "GENE_B"],
    "patient_2": ["GENE_C", "GENE_D"],
    "patient_3": ["GENE_A", "GENE_E"],
}

# Create an instance of the mock MultiDendrix
multi_dendrix = MockMultiDendrix()

# Define parameters
k = 3  # number of genes
t = 2  # number of patients

ARGS = {
    "multi_dendrix": multi_dendrix,
    "mutations": mutations,
    "k": k,
    "t": t,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_edge_dist Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/output.py
code served (permissive licence) · get_code("6fddb61386269dbe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import networkx as nx
import numpy as np

# Create a small graph with weighted edges
G = nx.Graph()
G.add_edge(0, 1, weight=0.5)
G.add_edge(1, 2, weight=1.5)
G.add_edge(2, 3, weight=2.5)
G.add_edge(3, 4, weight=3.5)
G.add_edge(4, 5, weight=4.5)

# Create deltas - thresholds for edge weight distribution
deltas = np.array([1.0, 2.0, 3.0, 5.0])

ARGS = {
    "G": G,
    "deltas": deltas
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_mutations_to_C_format Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/mutation_data.py
code served (permissive licence) · get_code("b54eb9d11c17ff7b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Construct valid arguments for convert_mutations_to_C_format

# Small example data:
# - 3 genes
# - 2 patients
# - Genes can have mutations in patients, and patients can have mutations in genes

m = 3  # number of genes
n = 2  # number of patients

genes = ['GENE_A', 'GENE_B', 'GENE_C']
patients = ['PATIENT_1', 'PATIENT_2']

# geneToCases: maps gene name -> list of patient names with mutations in that gene
geneToCases = {
    'GENE_A': ['PATIENT_1', 'PATIENT_2'],
    'GENE_B': ['PATIENT_1'],
    'GENE_C': ['PATIENT_2']
}

# patientToGenes: maps patient name -> list of gene names mutated in that patient
patientToGenes = {
    'PATIENT_1': ['GENE_A', 'GENE_B'],
    'PATIENT_2': ['GENE_A', 'GENE_C']
}

# Optional subtypes parameter
subtypes = None

ARGS = {
    'm': m,
    'n': n,
    'genes': genes,
    'patients': patients,
    'geneToCases': geneToCases,
    'patientToGenes': patientToGenes,
    'subtypes': subtypes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_solns Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/utils.py
code served (permissive licence) · get_code("646d9fed47dadc7e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# indexToGene maps gene indices to gene names
indexToGene = {
    0: "GENE_A",
    1: "GENE_B",
    2: "GENE_C",
    3: "GENE_D",
}

# solns is a list of arrays, where each array contains solutions
# Each solution M is structured as [...gene_indices..., score, fitness]
solns = [
    [
        [0, 1, 0.85, 0.92],      # genes 0,1, score 0.85, fitness 0.92
        [2, 3, 0.75, 0.88],      # genes 2,3, score 0.75, fitness 0.88
        [0, 2, 0.65, 0.80],      # genes 0,2, score 0.65, fitness 0.80
    ],
    [
        [1, 2, 3, 0.90, 0.95],   # genes 1,2,3, score 0.90, fitness 0.95
        [0, 1, 2, 0.70, 0.78],   # genes 0,1,2, score 0.70, fitness 0.78
    ],
]

ARGS = {
    "indexToGene": indexToGene,
    "solns": solns,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
graph_to_mutation_data Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/permute.py
code served (permissive licence) · get_code("a388b8293614beeb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Define small test data for the graph_to_mutation_data function
# H is a dictionary mapping patients to their mutations (genes)
H = {
    'patient_1': ['gene_A', 'gene_B'],
    'patient_2': ['gene_B', 'gene_C'],
    'patient_3': ['gene_A', 'gene_C']
}

# genes is a list/set of all genes
genes = ['gene_A', 'gene_B', 'gene_C']

# patients is a list of all patient identifiers
patients = ['patient_1', 'patient_2', 'patient_3']

ARGS = {
    'H': H,
    'genes': genes,
    'patients': patients
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
iter_num Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/output.py
code served (permissive licence) · get_code("41514aa1cf823b3e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'prefix': 'model_checkpoint',
    'numIters': 5000000.0,
    'ks': [3, 5, 7],
    'acc': 0.95
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_graph Ran
ran on a synthesized input
ilBarbara/BioRL/experiments/utils.py
code served (permissive licence) · get_code("159da52928b75420")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Graph. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import numpy as np
import tempfile
from collections import namedtuple

# Create temporary directory structure with mock files
temp_dir = tempfile.mkdtemp()
instances_dir = os.path.join(temp_dir, 'instances')
bkvl_dir = os.path.join(temp_dir, 'bkvl')
bksol_dir = os.path.join(temp_dir, 'bksol')

os.makedirs(instances_dir, exist_ok=True)
os.makedirs(bkvl_dir, exist_ok=True)
os.makedirs(bksol_dir, exist_ok=True)

# Create mock graph instance file (.mc)
graph_name = 'test_graph'
inst_path = os.path.join(instances_dir, graph_name + '.mc')
with open(inst_path, 'w') as f:
    f.write('3 2\n')  # 3 vertices, 2 edges
    f.write('1 2 5\n')  # edge between vertex 1 and 2 with weight 5
    f.write('2 3 7\n')  # edge between vertex 2 and 3 with weight 7

# Create mock best known value file (.bkvl)
val_path = os.path.join(bkvl_dir, graph_name + '.bkvl')
with open(val_path, 'w') as f:
    f.write('42.5\n')

# Create mock best known solution file (.bksol)
sol_path = os.path.join(bksol_dir, graph_name + '.bksol')
with open(sol_path, 'w') as f:
    f.write('101\n')  # binary string representation

ARGS = {
    'graph_dir': temp_dir,
    'graph_name': graph_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_graph_set Ran
ran on a synthesized input
ilBarbara/BioRL/experiments/utils.py
code served (permissive licence) · get_code("9887ce2dbe863145")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import networkx as nx
import scipy as sp
import numpy as np
import tempfile
import os

# Create temporary directory for the pickle file
temp_dir = tempfile.mkdtemp()
graph_save_loc = os.path.join(temp_dir, 'test_graphs.pkl')

# Create a small set of test graphs in different formats
test_graphs = []

# Add a networkx Graph
g1 = nx.Graph()
g1.add_edges_from([(0, 1), (1, 2), (2, 3)])
test_graphs.append(g1)

# Add a numpy array
g2 = np.array([[0, 1, 0], [1, 0, 1], [0, 1, 0]], dtype=float)
test_graphs.append(g2)

# Add a scipy sparse matrix
g3 = sp.sparse.csr_matrix(np.array([[0, 1, 1, 0], [1, 0, 0, 1], [1, 0, 0, 1], [0, 1, 1, 0]]))
test_graphs.append(g3)

# Save the graphs to pickle file
with open(graph_save_loc, 'wb') as f:
    pickle.dump(test_graphs, f)

ARGS = {
    'graph_save_loc': graph_save_loc
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tv Ran
ran on a synthesized input
ilBarbara/BioRL/src/comet/convergence.py
code served (permissive licence) · get_code("b28a2a9a7ba12564")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The tv function computes total variance distance between two sequences
# It iterates through indices and compares elements, returning the max absolute difference
# p and q should be sequences (list, tuple, array, tensor) with len() support and indexing

p = [0.1, 0.2, 0.3, 0.4]
q = [0.15, 0.18, 0.35, 0.42]

ARGS = {
    "p": p,
    "q": q
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bipartite_double_edge_swap Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/permute.py
code served (permissive licence) · get_code("cd32e999ec66db43")
How it ran

no invocation recorded.

check_condition Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/envs/saddlepoint.py
code served (permissive licence) · get_code("cd51a1fc23564cb6")
How it ran

no invocation recorded.

choose_delta Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/output.py
code served (permissive licence) · get_code("0b789d75b024c791")
How it ran

no invocation recorded.

construct_mutation_graph Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/permute.py
code served (permissive licence) · get_code("d56306f4d27a55b3")
How it ran

no invocation recorded.

discrete_convergence Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/convergence.py
code served (permissive licence) · get_code("d3c7bc0639c710a4")
How it ran

no invocation recorded.

discrete_convergence_eqb_plot Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/convergence.py
code served (permissive licence) · get_code("3a84f2cd9eb58674")
How it ran

no invocation recorded.

enumeration Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/envs/saddlepoint.py
code served (permissive licence) · get_code("ba02410b1835f606")
How it ran

no invocation recorded.

initial_solns_generator Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/utils.py
code served (permissive licence) · get_code("204686180f489e85")
How it ran

no invocation recorded.

load_mutation_data Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/comet/mutation_data.py
code served (permissive licence) · get_code("9e0d20c4942bc700")
How it ran

no invocation recorded.

saddlepoint Not yet run
unverified (harvested, no recorded run)
ilBarbara/BioRL/src/envs/saddlepoint.py
code served (permissive licence) · get_code("f1deba67bc27ecef")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 20 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many real-world problems can be reduced to combinatorial optimization on a graph, where the subset or ordering of vertices that maximize some objective function must be found. With such tasks often NP-hard and analytically intractable, reinforcement learning (RL) has shown promise as a framework with which efficient heuristic methods to tackle these problems can be learned. Previous works construct the solution subset incrementally, adding one element at a time, however, the irreversible nature of this approach prevents the agent from revising its earlier decisions, which may be necessary given the complexity of the optimization task. We instead propose that the agent should seek to continuously improve the solution by learning to explore at test time. Our approach of exploratory combinatorial optimization (ECO-DQN) is, in principle, applicable to any combinatorial problem that can be defined on a graph. Experimentally, we show our method to produce state-of-the-art RL performance on the Maximum Cut problem. Moreover, because ECO-DQN can start from any arbitrary configuration, it can be combined with other search methods to further improve performance, which we demonstrate using a simple random search.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1909.04063")
get_code_for_paper("1909.04063")
have("1909.04063")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1909.04063.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1909.04063.svg)](https://syntology.ai/paper/1909.04063)

Connect an agent — have() is free.