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:
- "Image contains hhh humans, ddd dogs, and bbb birds" when possible (and valid),
- "AI is hallucinating" in the other cases.
See Example Tests Cases for proper format
-- The idea is from a French coding contest 2024 --
Similar Kata:
Stats:
Created | Nov 15, 2024 |
Published | Feb 8, 2025 |
Warriors Trained | 15 |
Total Skips | 0 |
Total Code Submissions | 66 |
Total Times Completed | 12 |
C++ Completions | 12 |
Total Stars | 2 |
% of votes with a positive feedback rating | 67% of 3 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 6 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |