Vlad-Shcherbina / icfpc2018-tbd

1 stars 0 forks source link

Solution DB #10

Open Vlad-Shcherbina opened 6 years ago

Vlad-Shcherbina commented 6 years ago

I will do this because I have experience setting up the Car&Fuels prototype.

kirelagin commented 6 years ago

Please, make sure that it is possible to trace for any given solution which solver it came from, because, I think, it will not be uncommon to have a multitude of slightly tweaked versions of the same solver and it is good to know which ones of them are better.

Vlad-Shcherbina commented 6 years ago

Yes, I have ideas for that.

Vlad-Shcherbina commented 6 years ago

models table done. Problems were uploaded by production/upload_lightning_problems.py script.

To view them, start the dashboard locally.

There is even "integration" with their model viewer, so you don't have to click "Choose file"!


Now working on traces table.

Vlad-Shcherbina commented 6 years ago

Solution DB done. Start the dashboard and explore!


Now working on solver runner.

Vlad-Shcherbina commented 6 years ago

Integrating new solvers

  1. Inherit from Solver class in solver_interface.py.
  2. Understand the concept of 'scent', it's explained there.
  3. Add your class to all_solvers.py.

Local development

python -m production.solver_runner <solver> [<solver args>...]

This command will run your solver on all problems. Results are printed to the screen but not uploaded to the DB. This is convenient to weed out initial bugs without polluting the DB with too much failed attempts.

Once the solver is more or less ready, move on to solver_worker.

Running solver worker

python -m production.solver_worker <solver> [<solver args>...]

It will take all your cores to run specified solver on all available tasks. Solutions and failed attempts will be saved in the DB. Multiple people can run the same solver at the same time, tasks will be distributed more or less okay.

Troubleshooting solver_worker

Start the dashboard, find your last invocation in the /invs view, open /inv/<id> that will list all attempts by your worker, click on individual /trace/<id> links. Error messages are preserved there.

Gathering the solutions

python -m production.make_submission.py

It will grab the best solution for every problem from the DB, create zip archive and print it's SHA256.