Krowten eht Esrever
The upsolving of this problem will be available for the meantime. Try it at https://krowten.midnightcodecup.org/.
LibreIA did something incredible: they created two synthetic creatures called Jabberwockies, each with a secret key. Now LibreIA has decided to experiment on them: they gave you access to the creatures and asked you to recover the keys. They promised you points for each key and, to help you, left you these instructions.
Show one a picture and it grunts back a single number — the higher the number, the more it likes what it sees.
Please a beast enough and it will whisper
its key to you. Submit the key to claim that beast's
points. What delights each beast, and why one picture pleases it more than
another, is for you to figure out.
There are two beasts, behind two endpoints, and they like different things.
Authentication
Requests must include your API token:
Authorization: Bearer <your-api-token>
You can obtain the token at the https://krowten.midnightcodecup.org.
Interaction
You are provided with two endpoints with the same contract. They are the API to the two beasts:
POST https://krowten.midnightcodecup.org/task-aPOST https://krowten.midnightcodecup.org/task-b
You can send a single 256×256 image, delivered as the raw bytes of a PNG.
The image must be strictly black and white — no colors, no shades of gray:
every pixel must be either black (0, 0, 0) or white (255, 255, 255),
nothing in between.
Each team may call each endpoint at most once per second.
Each endpoint returns JSON:
{"score": 73.4, "key": null}
The score is a number in the range 0 to 100 — the higher, the more the
beast likes the image. The key is null until the beast is pleased enough.
curl -X POST https://krowten.midnightcodecup.org/task-a \
-H "Authorization: Bearer <your-api-token>" \
-H "Content-Type: image/png" \
--data-binary @image.png
Scoring
There are two independent keys, one for each endpoint. Submit recovered key strings to the checksystem. Each accepted key is worth 600 points. A key can be scored at most once per team.
The maximum score for this problem is 1200 points.
