Checklist HAIO 2025 Summer National Final · Task 3
Petike and the Parametric Palette
English title: Petike és a Paraméteres Paletta
Steer a pretrained variational autoencoder through its three-dimensional latent space so that it draws shapes of prescribed colours.
The task
"Petike" is a small variational autoencoder trained on 32×32 drawings of circles, squares and triangles in red, blue and green. Training has ended; he can only be instructed through his latent space (LATENT_DIM = 3). The contestant has his encoder, his decoder and his external classifiers, which indicate what he intended to draw.
Task 1 (25 points): implement the helper functions image_to_tensor, tensor_to_image, draw_shape (circle, square or triangle of a given size, position and colour on a 32×32 canvas), reconstruct, encode and decode. Task 2 (25 points): make Petike draw 5 different magenta circles. Task 3 (25 points): 5 different orange triangles. Task 4 (25 points): 5 different images in which blue appears. Partial credit is possible if fewer correct figures are shown.
Abridged by SOTA from the official materials. The official statement has the exact rules, and it wins wherever this summary differs.
In English
Some of this task's files were published only in Hungarian. SOTA translated that file into English on 16 September 2026.
Read the task description (one-pager) in English
Petike and the Parametric Palette
English translation by SOTA – AI Community of the Hungarian original. Licensed CC BY-NC-SA 4.0, like the original. Organisers who would like this translation removed can email [email protected].
Magyar MI Diákolimpia (Hungarian AI Olympiad)
Petike and the Parametric Palette (Petike és a Paraméteres Paletta)
Task description
24 May 2025
1. Petike and the Parametric Palette
Petike is in the youngest group at nursery school. His favourite pastime is drawing. He has recently got to know the basic shapes (the circle, the square and the triangle), and he is very enthusiastic whenever he can make drawings from them. The nursery school, however, has crayons in only a few colours, so until now Petike has used only red, blue and green. He gives every finished drawing to the nursery teacher, who helps him draw more and more beautifully.
The nursery teacher, however, behaves peculiarly: she never says a word, yet she always knows exactly how well a drawing turned out, and Petike can sense this too. In reality the nursery teacher is none other than a cost function, who, after every drawing, silently but firmly lets Petike know how well he did. This is how Petike learnt to draw shapes during training.
By now, however, the training period has ended. Petike no longer learns from new examples – he knows only what he learnt from his earlier drawings. But it is still possible to communicate with him, just not in the way one would with an ordinary nursery-school child.
Petike cannot be instructed directly, and he does not learn from new examples either. There is only one way for us to understand each other: through his latent space. If we give him a point there, Petike turns it into a drawing in his own style.
Fortunately, we have a few tools at hand:
- Petike's decoder: from this we know what he will draw on the basis of a given latent point;
- Petike's encoder: with this we can map existing drawings into the latent space – so, for example, if we show him an example (e.g. a red square), we can find out where Petike "imagines" it in the latent space;
- Petike's external classifiers: besides drawing what he imagines in the latent space, Petike can also point out what he wanted to draw.
Your task: explain to Petike, through the latent space, that he should draw:
- 5 different orange triangles
- 5 different magenta circles
- 5 different pictures in which the colour blue appears
2. Scoring
- Implementing the helper functions – [25 points]
- 5 different magenta circles – [25 points]
- 5 different orange triangles – [25 points]
- 5 different pictures in which the colour blue appears – [25 points]
Maximum score: 100 points
3. Technical information
To solve the task, the attached Notebook file and the pretrained weight file petike.pth are sufficient. The list of required libraries and the steps needed to run the notebook are described in detail at the beginning of the notebook.
After solving the task, regardless of whether you worked in Google Colab or locally, you must upload the .ipynb file to the CMS system for the corresponding task. No other file needs to be uploaded.
4. Useful resources
Translated by SOTA. The Hungarian original is the official version and wins wherever the two differ. Original by the Hungarian AI Olympiad (ELTE Faculty of Informatics), licensed CC BY-NC-SA 4.0; this is a translation of the task one-pager, and the official English notebook of the task is linked on this page. This translation is shared under CC BY-NC-SA 4.0, the licence of the original. If you organise this olympiad and would like the translation removed, email [email protected] and we will take it down.
At a glance
- You get
- The model definition in the notebook and the pretrained weights
petike.pth(downloaded with gdown; also in the repository folder adatok/parameteres-paletta). - You submit
- The completed .ipynb notebook uploaded to the CMS; no other file is needed.
- Scoring
- 100 points (25 × 4); partial credit for fewer correct figures; graded by the organisers.
- Rules
- Keras and TensorFlow are not allowed; any PyTorch-based tool may be used.
- Work only on the provided lab machines (Windows); own laptops are not allowed. Google Colab is recommended; a local Python environment is also provided.
- At most one NVIDIA T4 GPU; stronger GPUs (e.g. A100, V100) lead to disqualification.
- General internet access, but code-completion and LLM services (e.g. GitHub Copilot, ChatGPT, Claude) are forbidden; the free tier of Gemini 2.5 Flash integrated in the Google ecosystem is the only exception.
- Publicly available documentation, articles and books may be used during the practical part; audio-visual material is forbidden; communication is forbidden.
- Mandatory screen recording with OBS Studio for the whole contest.
- Format
- Summer National Final (Nyári Országos Döntő), 24 May 2025, on site at ELTE, Budapest. Second (practical) part: two hours of programming after a 15-minute briefing; four 100-point tasks (CV, ML, NLP, RL). Solutions (.ipynb) are uploaded to the CMS.