Beta

AI testing #1

Description:

You're coding an AI to analyse images, and to count how many humans, dogs, and birds are on a given image..

After 2 months R&D, you realize that it is much easier to count the number of eyes, of legs, and tails and then with some -simple- maths to retrieve the information you're interested in.

Oh Oh but .... now your're testing your AI, and it appears that on some occasions, it is hallucinating.

In order to detect these hallucination cases as soon as they occur, you set up a simple -but robust- detector to be deployed on a test dataset of generated photos featuring humans, dogs and birds.

For any given measurements (number of eyes, legs, and tails), can you give the number of corresponding humans, dogs and birds ?

Your function will take those 3 values as arguments. The returned value is a string:

  1. "Image contains hhh humans, ddd dogs, and bbb birds" when possible (and valid),
  2. "AI is hallucinating" in the other cases.

See Example Tests Cases for proper format

-- The idea is from a French coding contest 2024 --

More By Author:

Check out these other kata created by eurydice5717

Stats:

CreatedNov 15, 2024
PublishedFeb 8, 2025
Warriors Trained15
Total Skips0
Total Code Submissions66
Total Times Completed12
C++ Completions12
Total Stars2
% of votes with a positive feedback rating67% of 3
Total "Very Satisfied" Votes1
Total "Somewhat Satisfied" Votes2
Total "Not Satisfied" Votes0
Total Rank Assessments6
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • eurydice5717 Avatar
Ad