Skip to content

Creating Solvers and Generators

Henri Lotze edited this page Mar 21, 2021 · 2 revisions

By default, the match class runs its given generators and solvers as subprocesses inside a docker container.

The communication with these containers is fairly straightforward: They receive their input via stdin and are supposed to write back their output via stdout.

A generator should thus be able to read a single number which is the instance size for which it should create an instance. It then computes this instance and writes it to stdout, according to the problems specification.

The solver should be able to read an instance via stdin, which is encoded according to the problem specification. It should then compute its solution and write it to stdout.

It is considered good style to provide your own dummy solver and generator when creating a task, that output correct instances and solutions for each instance size. This helps the teams to get an easy understanding for writing code for your problem specifications.

Since both the generator and solver are written in docker, the details of implementation are up to the teams.

One important thing to note is that the docker containers only have internet access during the build process and are cut off during execution.