Skip to main content
Back to ONIA Winter Warmup Challenge 2025
Competition ended
Archive problem
Competition: ONIA Winter Warmup Challenge 2025

The Magic of Words

Author: Mihai Nan

Hard
Your best score: N/A
Problem Description

The Magic of Words

🔮 The Apprentice’s Mission

You have been summoned by Arcanus, the Greatest Wizard of the Realm of Words, to take part in the ONIA Winter Warmup Challenge 2025, the national competition of magic and artificial intelligence.

Arcanus has created magical images filled with symbols, shapes, and mysterious artifacts, each generated from hidden keywords. Only those with sharp eyes and a clear mind will be able to decipher their subtle meanings.

Each image combines elements from 3 carefully selected thematic grimoires, chosen from the following:

  • Animals – contains words representing domestic and wild animals.
  • Christmas – contains words associated with Christmas celebrations.
  • Fruits & Vegetables – contains words representing fruits and vegetables.
  • Magic – contains words representing concepts and objects from the magical and fantasy world.
  • Objects – contains words representing everyday items and furniture.
  • Plants – contains words representing flowers and decorative plants.
  • School Items – contains words representing school objects and educational materials.

From each grimoire, Arcanus chose one word, and these 3 words were used to build a spell that generates a 1024 × 1024 image. He then added 17 more randomly selected words, resulting in 20 candidate words.
To pass the test and be chosen as Arcanus’s apprentice, you must select 5 words, from the 20, that you consider essential for constructing a spell that could generate the given image.

The table below reveals some of the spell results: the keyword combinations, the selected grimoires, and their visual effect as they materialized in Arcanus’s chamber of incantations.

Example imageWords usedSelected grimoires
Holly, jackal, SunflowerChristmas, Animals, Plants
Gingerbread, Magnolia, swanChristmas, Plants, Animals
potion, Christmas tree, CamelliaMagic, Christmas, Plants
vacuum, flamingo, tabletObjects, Animals, Education
Fern, lantern, desk_lampPlants, Objects, Education

🎯 Task Description

Your task is to build an Artificial Intelligence model capable of identifying 5 relevant words for each image. Selecting these 5 words must follow these rules:

  • The 3 words used to generate the original image must be included among the 5 selected by the model.
  • The order in which the model provides the selected words matters, because if the first 3 words match the original spell words, Arcanus will award bonus points.

Scoring rules:

  • 0.3 points for each correct word included in the 5 selected
  • 0.1 additional points if a correct word is among the first 3 positions
  • Maximum score per image: 1.2 points

For the entire test set, the sum of all per-image scores is computed. Based on this value, the final score is calculated:

  • If the total sum is below 50, the final score is 0 points.
  • If the total sum is above 90, the final score is 100 points.
  • If the total sum is between 50 and 90, the final score is computed proportionally, via linear interpolation.

Your model must learn to recognize subtle clues and prioritize the correct words.

📜 Data Provided by Arcanus

By his great generosity, the mighty wizard Arcanus has decided to offer you several example spells, so you and your AI-based solutions can understand the mechanisms of magical art and prepare for the final apprentice exam.

Training data

Each training sample includes:

  • Generated image: dataset/train/<id>/image.png – the visual representation of the keyword combination
  • Metadata JSON file: dataset/train/<id>/metadata.json, containing:
    • image_path: path to the image
    • prompt: the prompt used to generate the image
    • correct_words: the 3 keywords used in the prompt
    • categories_used: categories from which the 3 keywords were taken
    • word_choices: the full list of 20 words (the 3 correct ones plus 17 random ones), used for the selection task

Example JSON:

{
  "image_path": "dataset/train/00001/image.png",
  "prompt": "dragon, pencil, tulip, colorful, surreal, like Codenames Pictures",
  "correct_words": ["dragon", "pencil", "tulip"],
  "categories_used": ["animals", "school_items", "flowers"],
  "word_choices": ["dragon", "pencil", "tulip", "book", "eraser", "hat", "rose", "wand", "star", "globe", "map", "chair", "desk", "coat", "shoe", "ruler", "backpack", "wand", "crayon", "flowerpot"]
}

Evaluation data

Each test sample includes:

  • Generated image: dataset/test/<id>/image.png
  • Metadata JSON file: dataset/test/<id>/metadata.json, containing:
    • image_path: path to the image
    • word_choices: the complete list of 20 words (including the 3 correct ones and 17 random ones), for the selection task

🪄 Submission File 📜

After training your model and learning to decipher the connections between images, words, and their grimoires, the great Arcanus asks you to submit your final results as a single CSV file. This is the official parchment that apprentices submit at their magical exam.

The submission file must be in CSV format and must contain exactly the following columns:

  • ID – the identifier of the sample (same ID as in the dataset)
  • word1
  • word2
  • word3
  • word4
  • word5

These five words represent the most important 5 words chosen by your model from the list of 20 given for each example.
Their order is essential:

  • word1 – the word considered most relevant by the model
  • word5 – the word considered least relevant among the 5 selected

🪬 Arcanus warns: “Order is the key! Without it, the magic collapses.”

🗂️ Example CSV structure

ID,word1,word2,word3,word4,word5  
00001,dragon,tulip,pencil,star,chair  
00002,holly,jackal,sunflower,wand,globe  
00003,candle,elf,peony,fox,notebook  
Submit Solution
Upload output file and optionally source code for evaluation.

Submission File

Source Code File (optional)

Sign in to upload a submission.