Experimental Evaluation

The experimental study is a team activity and is the point where the different algorithmic approaches come back together.

Your team will compare:

The goal is not simply to determine which program is fastest or which heuristic wins the most benchmark cases. The goal is to understand where each approach works, where it struggles, and why.

Ground Truth and Bounds

Whenever possible, compare heuristic solutions with an exact optimum.

The instructor may provide precomputed optimal values for part of the benchmark collection. These values allow heuristic development and analysis to proceed independently of the speed of your team’s exact implementation.

When an exact optimum is unavailable, use a valid lower or upper bound when appropriate for your problem.

Coverage

For a heuristic, one useful measurement is the fraction of benchmark instances on which the heuristic finds an optimal solution:

coverage=NoptNtested \mathrm{coverage} = \frac{N_{\mathrm{opt}}}{N_{\mathrm{tested}}}

where NoptN_{\mathrm{opt}} is the number of benchmark instances on which the heuristic finds an optimal solution and NtestedN_{\mathrm{tested}} is the number of instances tested.

Coverage is not sufficient by itself. Two heuristics can have the same coverage while behaving very differently on the instances they miss. You should also measure the magnitude of the error or gap from the optimum.

Depending on your problem, useful measurements may include:

Input Structure

Input size alone may not explain algorithm difficulty.

Your experiments should therefore examine at least one meaningful structural characteristic of the input in addition to its size.

For an undirected graph G=(V,E)G=(V,E), graph density is:

d=2∣E∣∣V∣(∣V∣−1) d = \frac{2|E|}{|V|(|V|-1)}

A density of 0 represents a graph with no edges, while a density of 1 represents a complete graph.

For graph problems, benchmark collections may include all non-isomorphic graphs of selected sizes. This permits a systematic study of questions such as:

Do not assume in advance that sparse, intermediate, or dense instances must be easier or harder. Treat these as empirical questions and let the data support your conclusions.

Problem specifications for non-graph problems will identify analogous structural measurements when appropriate.

Exact-Search Measurements

Running time is important, but it often does not explain why an improved exact algorithm performs differently.

Collect statistics appropriate to your implementation, such as:

Use these measurements to compare the exhaustive and improved exact algorithms.

Interesting and Difficult Instances

Your team must identify at least one benchmark instance that helps explain an important feature of your algorithms.

Examples include:

You should be able to show or describe this instance and explain what happens algorithmically.

For a graph problem, this may mean drawing the graph and tracing the choices that cause a heuristic to succeed or fail.

Where Experiment Files Belong

The repository provides three student-owned experiment locations:

experiments/
├── scripts/
├── results/
└── local/

Use experiments/scripts/ for team-created scripts that run, summarize, or analyze experiments. Commit scripts needed to reproduce important results.

Use experiments/results/ for results that are required by a checkpoint or needed to support the conclusions in your report or presentation. These files are part of the repository and should be committed when appropriate.

Use experiments/local/ only for disposable or machine-local intermediate files. Except for the README already in that directory, its contents are ignored by Git. Files placed there are therefore not backed up by GitHub and are not included in normal repository submissions. Do not place required code, benchmark instances, required results, or anything needed to reproduce your conclusions there.

Course-provided benchmark collections remain under benchmarks/ and are part of the repository.

Reproducibility

Your repository should contain the scripts and instructions needed to reproduce the important experiments reported in the final submission.

You do not need to commit enormous temporary files or every intermediate run. You do need to preserve enough information that another person can determine:

Benchmark Evaluation

Some benchmark evaluation may be run using instructor-provided infrastructure.

The benchmark is intended to provide a consistent collection of inputs and to encourage robust algorithm design. A leaderboard may be used, but leaderboard position is not the primary goal of the project.

A strong final analysis explains the behavior behind the numbers rather than merely reporting a score.