## cpHydra

cpHydra is a portfolio constraint solver that won the CSP solver competition in 2008.

The principle of cpHydra is simple and was widely used in other portfolio approaches:

During the training phase, a large set of instances are solved with each algorithm in the portfolio and a case-base is built. The case-base contains one entry per seen instance which is a list of features that concisely describes it. For each such entry, we store the CPU time required by each solver of the protfolio.

Then, during the competition, given an instance *A*, we retrieve the *k* most similar cases in the case-base, and solve a constraint program which allocates a duration in seconds to each solver, such that

The total duration is equal to 30 minutes

The number of solved cases (among the

*k*most similar) is maximised if we run each solver for its allocated time duration

The paper describing this approach was published at AICS 2008, however, it one of my most cited papers.

You can download the Java source code of cpHydra.