Checklist Slovak AI Olympiad 2026 National Round · Task 1
Recognising Grains (Dry Bean Varieties)
English title: Rozpoznávanie zŕn
Classify seven dry-bean varieties from 16 shape and size features, e.g. with tree-based models.
The task
The dataset has 9,527 grains of seven dry-bean varieties (SEKER, BARBUNYA, BOMBAY, CALI, DERMOSAN, HOROZ, SIRA), each described by 16 numerical features derived from high-resolution images (area, perimeter, axis lengths, aspect ratio, eccentricity, convex area, equivalent diameter, extent, solidity, roundness, compactness and four shape factors).
Contestants train a classifier (for example with decision-tree methods) on the training set and predict the variety for the test set.
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 Slovak. SOTA translated that file into English on 17 September 2026.
Read the task statement in English
Task 1: Recognising Bean Varieties with Explainable Tree Models
English translation by SOTA – AI Community of the Slovak original, Uloha1_rozpoznavanie_zrn.pdf ("Úloha 1: Rozpoznávanie odrôd fazule pomocou vysvetliteľných stromových modelov"), published among the national-round tasks of the Olympiáda v umelej inteligencii (Slovak Olympiad in Artificial Intelligence), 2025/26. The original task belongs to its authors. Organisers who would like this translation removed can email [email protected].
In agriculture, in the food industry and in the automated sorting of crops, it is important to be able to distinguish different kinds of seeds quickly and reliably. In practice, image-based or geometric characteristics of the objects, obtained from cameras and sensors, are often used for this. In such tasks, however, it is not enough merely to achieve high accuracy. It is also important that the model can explain its decision: which properties were decisive, which rules led to the classification, and where the model makes mistakes.
[Figure: see the original statement.]
In this task you will work with the real Dry Bean dataset from the UCI Machine Learning Repository. The dataset contains 13 611 samples of seven varieties of dry beans. For each bean, 16 numerical features are available, derived from image analysis of the shape and size of the seeds. The dataset was created from images taken with a high-resolution camera and is freely available for download: https://archive.ics.uci.edu/dataset/602/dry%2Bbean%2Bdataset
Your task will be to create and analyse a system that:
- classifies the bean variety using decision trees,
- compares a single tree with groups of trees (ensemble trees),
- uses PCA to visualise and analyse the data,
- and explains as well as possible why the model decides the way it does.
Data preparation
- Download the dataset and load it into your program.
- Check whether the data contain missing or suspicious values.
- Split the data into a training part and a test part, for example in the ratio 80:20.
- Use a stratified split, so that the class proportions remain similar in both parts.
- If appropriate, also prepare a standardised version of the data for PCA.
Data exploration and PCA
- Find out which features (attributes) are strongly related to one another.
- Use the PCA method to reduce the dimension of the data to at least 2 principal components.
- Create a 2D plot of the samples after projection into the PCA space.
- Comment on:
- which classes are well separated,
- which classes overlap,
- how much of the variability the first two or three principal components explain.
Training a decision tree
- Train a classification Decision Tree model.
- Try at least two settings:
- a simple, shallow tree,
- a deeper or less constrained tree.
- Compare, for example, the effect of the parameters:
- max_depth,
- min_samples_leaf,
- criterion (gini vs. entropy).
- Evaluate the model using the metrics:
- accuracy,
- macro F1-score,
- confusion matrix.
- Visualise the final tree or a part of it.
Interpreting the tree
Extract as much information as possible from the decision tree. Find at least 5 interesting rules, for example in the style:
If Area > ... and ShapeFactor1 < ..., then it is probably the variety ...
Choose at least 3 misclassified samples and explain:
- which path the tree took,
- at which decision point the model "went wrong",
- which classes were similar to each other.
Compare:
- a simpler tree with lower accuracy but better interpretability,
- a more complex tree with higher accuracy but worse readability.
Groups of trees (ensemble)
Train at least two ensemble tree models, for example:
- Random Forest,
- Gradient Boosting,
- or Bagging with decision trees.
Compare them with a single decision tree in terms of:
- accuracy,
- macro F1-score,
- stability of the results,
- interpretability.
Comment on why groups of trees often achieve better results than a single tree, but are at the same time harder to explain.
PCA vs. tree models
Compare:
- models trained on the original features (original attributes),
- models trained on the PCA components (after applying PCA).
Evaluate:
- whether PCA improved or worsened the results,
- whether the visualisation improved after PCA while the interpretability worsened,
- whether tree models need PCA at all.
An explainable model of bean grains
Imagine that a company wants to build a simple device that can measure only a few properties of a bean, not all 16.
Propose a procedure:
- select only the 3 to 5 most important features,
- train a new tree on them,
- compare its result with the model that uses all the features.
Finally, answer:
- What is the minimum number of measurements that still suffices for reasonable sorting?
- By how much does the accuracy drop?
- Is a simpler and cheaper model worth it?
What to submit
- The solution code in the form of .py or .ipynb.
- Brief documentation or comments in the code.
- Model outputs and plots:
- the PCA visualisation,
- the confusion matrix,
- a comparison of the models' metrics,
- a visualisation of at least one decision tree.
- A short written commentary on the results, in which you explain:
- what was most important for the classification,
- which classes were confused with each other,
- what the difference was between a single tree and the groups of trees,
- what PCA showed.
Scoring
0 – 100 points
The assessment takes into account:
- 30 points – correctness of the data preparation and of the implementation,
- 20 points – quality of the modelling with decision trees,
- 15 points – comparison with ensemble tree models,
- 15 points – meaningful use of PCA,
- 20 points – interpretation of the results, commentary, originality and clarity.
Translated by SOTA. The Slovak original is the official version and wins wherever the two differ. This is the jury-graded project version published on ai-olympiada.sk. The national-round task on the Nitro AI judge ("Rozpoznávanie zŕn", with an official English statement) is an automatically scored classification task on the same Dry Bean data. 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
train_dataandtest_data(test rows indexed 0–4083) andsample_output.csv.- You submit
- CSV with subtaskID (always 1), datapointID (test row index) and answer (variety).
- Scoring
- Weighted F1: 10 points if F1 < 0.3, linear between 10 and 90 points for 0.3 ≤ F1 < 0.9, 100 points if F1 ≥ 0.9. Failed submissions score 0 and do not count towards the limit.
- Rules
- AI-assisted coding tools (ChatGPT, Gemini, Copilot or similar) are prohibited.
- No collaboration, plagiarism, pre-written solutions or external code repositories.
- Only the packages installed in the competition environment (a long list of standard ML/DL/NLP/CV libraries is given in the rules).
- Submission limit 50, two final submissions (platform settings).
- Format
- National round (celoštátne kolo), 16–18 April 2026, Faculty of Science, Pavol Jozef Šafárik University (UPJŠ), Košice; contest on Nitro AI Judge on 17 April 2026, 06:30–12:00 UTC; 24 contestants; individual. Statements on Nitro are bilingual (English first, then Slovak).