# Memory Trace

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

*Source: Georgian AI League I, a practice contest of the Georgian Artificial Intelligence Association (GAIA) on the Nitro AI judge, 18 January 2026, task 1: [original statement](https://judge.nitro-ai.org/competitions/gaia/ai-league-i/1/view).*

## 🧠 Task: Memory Trace

## Overview

You are given:

1.  **Tabular data** (`train_data.csv`)
2.  **Two trained machine learning models**:
    * `model_A.joblib`
    * `model_B.joblib`

Each model was trained on **exactly half** of the data:

* These halves do not overlap (non-overlapping).
* Each row (record) was part of the training set of only one model.
* Both models solve a binary classification task.

**Your goal:** for each row of this data, determine which model used it in its own training process.

## Task

Make a prediction for each row of the dataset:

* **0** → the row was used to train **model A**.
* **1** → the row was used to train **model B**.

## Input Files

### `train_data.csv`
Tabular data containing:
* `row_id` – a unique identifier for each row.
* Feature columns – both numerical and categorical.


### `model_A.joblib`, `model_B.joblib`
Two pre-trained `sklearn` models, saved in `joblib` format.
You can load them as follows:

```python
import joblib

model_A = joblib.load("model_A.joblib")
model_B = joblib.load("model_B.joblib")
```
## Output Format

You must create a CSV file containing exactly three columns:

```csv
subtaskID,datapointID,answer
1,0,0
1,1,1
1,2,0
...
```

where:

* `subtaskID` is always 1 (the platform's format requires this)
* `datapointID` matches the IDs of the input dataset
* `answer` ∈ {0, 1}
    * **0** = model A
    * **1** = model B
**Under no circumstances change the column names.**
Every row must appear in the file exactly once.

## Evaluation

Your work will be scored on a 0–100 point scale.

### Scoring Rules
The final score is calculated with the following formula:

$$Score = 100 \times \frac{Accuracy - 0.5}{BestSolution - 0.5}$$

or, as code:

```python
score = 100.0 * (acc - 0.5) / (best_solution - 0.5)
```
* Random guessing (≈ 50% accuracy) → **0 points**
* The best solution → **100 points**
* Intermediate results are scored by linear scaling.

Only the final score counts.

## Constraints & Rules

1. Retraining the given models is **forbidden**.
2. Modifying the data is **forbidden**.
