This year task was about drawing art paintings using commands for a special robot.

Final results

We finished at 18th place!

Overall impression

This was a great contest! Very intuitive problem, interactive leaderboard to compete and flawless infrastructure on organizer’s side.

Members

Same as last year, we had the following members:

  • Dmitry K.
  • Dmitry P.
  • Mikhail K.
  • Oleg G.
  • Victor K.
  • Vitaly A.

Languages used

  • Python (solver)
  • Java (solution optimizer)
  • Javascript (UI)

Solution

We found that you can draw pretty detailed pictures if you start from one of the opposite corners and gradually go backwards. We had a python-based solver doing that. This was a baseline for our solution.

Additionally we have an optimizer written in Java (miner) that would take existing solution and start refining that by moving each step for a few pixels. This produced another good source of score improvements.

Finally we had a UI where you can visualize each solution step-by-step and look for insights.

Misc Stuff

Organizers were extremely kind to keep only the best scores in submissions:

For Problem 1 chess, we manually fine-tuned the sequence of cuts and swaps:

Solution for Problem 3 where we almost manually produced the result through the UI, getting very close to optimal scores.

After implementing DSL in python, the solution looked like this:

    b = Block("0", begin = (0, 0), end = (400, 400))
    [_, b1] = b.line_y(400 - (sum(rows_lengths) + extra_row), prog)
    [b2, _] = b1.line_x(sum(left_sides) + sum(right_sides) + extra_side, prog)
    [b3, main_block] = b2.line_y(b2.begin[1] + extra_row, prog)
    [bottom_line, _] = b3.line_x(sum(left_sides) + sum(right_sides), prog)

    split_by_lines(main_block, bottom_line)

Miner finding another source of optimizations: