# Task 2: The Mischievous but Wise Eraser

*English translation by SOTA – AI Community of the Slovak original, [uloha2_vision.pdf](https://ai-olympiada.sk/wp-content/uploads/sites/91/2026/08/uloha2_vision.pdf) ("Úloha 2: O nezbednej ale múdrej gume"), from the Olympiáda v umelej inteligencii (Slovak Olympiad in Artificial Intelligence), 2025/26, home round. The original task belongs to its authors. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

The compass, the pencil, the scissors, the ruler and the dot were writing digits. First they wrote ones, then twos, and when they grew tired of threes, they set about all the other digits, zero included. The compass wrote the most beautiful digits, whereas the tiny dot preferred just to watch. When they had written some two thousand digits, they lay down in the sun and soon fell asleep. While they were asleep, the eraser came rushing in and began to rub out their digits. It did not leave a single one alone, and it went over each of them exactly once, moving along a randomly chosen Bézier curve.

*[Figure: see the original statement.]*

When the compass, the pencil, the scissors, the ruler and the dot woke up and saw what the eraser had done, they started chasing it. "So you would rub out such beautiful digits of ours, would you?" grumbled the compass, and prick, prick, it tried to prick the eraser. They chased the eraser for an hour, they chased it for two, but the eraser kept escaping them. Towards evening, however, it ran out of strength; its pursuers surrounded it on all sides, and it had to repent: "I promise that from now on I will rub out only mistakes!"

"But who will put right the damage you have already done?" said the compass, refusing to be soothed. "Nobody can repair so many digits!" "The students will help us with that, and they will even have fun doing it," suggested the eraser. "They have recently learnt what an autoencoder is; it is enough to advise them that the same architecture could solve this problem as well." "But surely that would take far too long to train," objected the scissors. "Not that long, if they start from a model they have already trained," replied the eraser.

## Your task is:

To create a notebook that will help the school supplies repair their erased digits.\
You can obtain the file of erased digits using the notebook at the following address (it is also attached):\
<https://colab.research.google.com/github/andylucny/OAI/blob/master/problems/rubber.ipynb>

## You submit one zip file containing:

- the notebook in which you carried out the repair, containing, among other things, a display of 10 pairs of images before and after the repair
- the whole model in the file repairer.pth
- the file 2000_fixed_digits.pt containing the repaired digits (keep their order) in the same format as they are in the file 2000_rubbered_digits.pt
- optionally, any further materials you consider appropriate
- the size of the zip file must not exceed 70MB

## Scoring:

0–100 points; the following are taken into account: the quality of the result, the originality of the solution (the more easily you arrive at the result, the better), and the clarity and credibility of the commentary on the solution.
