# The Martian Archivist

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

All-Russian School Olympiad in Informatics 2025–2026, Regional Stage, Grades 9–11<br>
“Artificial Intelligence” profile, Tour 2, 19 January 2026<br>
Task D

**Points for the task:** 100<br>
**Answer submission format:** uploading an answer file in .csv format<br>
**Number of attempts:** 20<br>
**Submission that counts:** the last one

## Statement

During the third year of the expedition to Valles Marineris on Mars, our acquaintance Andrey, an engineer and a specialist in extraterrestrial systems, came across something incredible: a perfectly preserved crystalline memory module hidden deep beneath the surface of the canyon.

When the module was carefully extracted and connected to power, it awakened an ancient Martian AI that called itself “Archivist Unit F”, the keeper of the knowledge of a vanished civilisation. The Archivist revealed that its memory holds extensive information about the crystals that the ancient Martians used in their laboratories and energy reactors.

Each crystal was described by an embedding: a vector of length 16 reflecting its structure, composition, resonance properties and many other characteristics that humans cannot yet interpret directly. Besides the embedding, the Archivist also stored the class (one of 25 possible), that is, the type or functional purpose of the crystal.

But over thousands of years under the Martian dust, the Archivist had been damaged.

For many crystals, the class information was lost completely.

For others, it was preserved only partially: instead of one exact class, the Archivist gave several possible options, sometimes reasonable and sometimes completely random. It seems that the data structures inside the module got mixed up, and no simple method of recovering the information works.

Andrey and his team are extremely interested in the ancient knowledge about Martian crystals: understanding their properties could lead to a breakthrough in energy-intensive technologies and materials science.

That is why they are turning to you.

Your task is to help the Archivist restore the true classes of those crystals whose information was lost or damaged. You will be given:

- the embeddings of the crystals,
- the correct classes for some of them,
- ambiguous lists of possible classes for the others,
- and also a set of crystals whose classes you have to predict.

Like the ancient AI, you will have to work under uncertainty and with incomplete information. However, modern machine learning methods offer a chance to recover a significant part of the lost knowledge, if they are applied carefully and inventively enough.

## Input format

The following files are attached to the task:

- `train.csv` - contains information about the crystals for which the true or possible labels are known. Fields:
  - `id` — the unique identifier of the object.
  - `F{i}`, where $i \in \{1, \dots, 16\}$ — the components of the embedding.
  - `labels` — the set of possible classes for this object (the true class may be among them, but it may also be absent).
- `test.csv` — a file with the embeddings of the crystals whose classes must be predicted. It is guaranteed that each object belongs to exactly one of the 25 classes.
- `baseline.ipynb` — a notebook with a baseline solution to the task.
- `submission.csv` — an example of the solution that you need to submit to the testing system.

## Output format

You need to submit, as your submission, the file `submission.csv` containing two columns:

- `id` — the identifier of the object from test.csv.
- `class` — the class label predicted by the model

## Scoring

The maximum for the task is 100 points.

The test data are divided into a public and a private part.

After you submit a solution, the system shows the result on the public part.

The final result will be calculated on the private part after the contest ends. After the end of the stage, your metric will be converted to a 100-point scale according to the following rule:

- the result of the **baseline solution** (Accuracy=0.2717) is worth **0 points**;
- the result of the **author's solution** (Accuracy=0.8) is worth **100 points**;
- results between these two points are distributed linearly.

## Answer evaluation metric

This task uses the metric **Accuracy**. It is calculated as the fraction of objects in the test set whose class is predicted correctly.

Strict mathematical definition of the metric **Accuracy**:

$$
\text{Accuracy} = \frac{\text{number of correct answers}}{\text{total number of test crystals}}.
$$

Example of computing the **Accuracy** metric in *Python*:

```python
from sklearn.metrics import accuracy_score

y_true = [0, 1, 2, 2, 1]
y_pred = [0, 2, 1, 2, 1]

acc = accuracy_score(y_true, y_pred)
print("Accuracy =", acc)
```
