Blue Prince

Blue Prince

View Stats:
Classroom Worksheets
So I am currently chipping away at solving the Classroom puzzles and I think I have the right answers but want to verify them. I want to figure out the worksheets myself but I do want the instant feedback of seeing if I am right.
Does anyone know of a guide/article that would have that? I went looking online and all I could find were articles showing the answers for the Final Exam but I haven't even drafted that Classroom yet and I definitely don't want those spoilers.
Any help would be appreciated!
< >
Showing 1-4 of 4 comments
Silyon May 22 @ 7:51pm 
I haven't seen a guide or anything like that, but in general what you want to do is find the two sheets with the highest scores and play "spot the difference". What the sheets agree on is most probably correct, and the difference between that and what their scores actually were is the number of other answers they got that were correct. Because these are always different 'incorrect' answers between the sheets, you can usually deduce from that who was correct and incorrect, especially with the help of a third sheet.

Some of them are simply old puzzles revisited, like the paired paintings and the Dartboard.
Here's some bruteforce C code to ruin the mystique. Runs in about 10-20 sec to iterate the ~2 billion possibilities.

gcc main.c; ./a.out


#include <stdio.h>
#include <string.h>

#define ANSW_LEN 12
#define TESTS_COUNT 4

const char alphabet[] = "BGYORP";
const int l_alpha = 6;

// count differing positions in two ANSW_LEN-long char arrays
int count_diffs_fast(const char *s1, const char *s2) {
int diff = 0;
for (int i = 0; i < ANSW_LEN; i++) {
if (s1 != s2) diff++;
}
return diff;
}

// return 1 iff each letter in `alphabet` appears exactly twice in s[0..ANSW_LEN-1]
int check_exactly_two(const char *s) {
int counts[l_alpha];
memset(counts, 0, sizeof counts);
for (int i = 0; i < ANSW_LEN; i++) {
for (int j = 0; j < l_alpha; j++) {
if (s == alphabet[j]) {
counts[j]++;
break;
}
}
}
for (int j = 0; j < l_alpha; j++) {
if (counts[j] != 2) return 0;
}
return 1;
}

// runs all checks on candidate ans[]
int passes(const char *ans, const char tests_answers[TESTS_COUNT][ANSW_LEN]) {
if (!check_exactly_two(ans)) return 0;
if (count_diffs_fast(ans, tests_answers[0]) != 2) return 0;
if (count_diffs_fast(ans, tests_answers[1]) != 3) return 0;
if (count_diffs_fast(ans, tests_answers[2]) != 2) return 0;
if (count_diffs_fast(ans, tests_answers[3]) != 10) return 0;
return 1;
}

int main(void) {
// test strings as plain char arrays
const char test_strs[TESTS_COUNT][ANSW_LEN] = {
"ORYBOYRGGPBP",
"ORYBGYRPGOYP",
"ORBBPYRRGOBP",
" RR R R R "
};

char ans[ANSW_LEN];
int digits[ANSW_LEN] = {0};

// initialize ans[] = all alphabet[0]
for (int i = 0; i < ANSW_LEN; i++) {
ans = alphabet[0];
}

// compute total combinations = 6^12
long long search_space = 1;
for (int i = 0; i < ANSW_LEN; i++) {
search_space *= l_alpha;
}

for (long long iter = 0; iter < search_space; iter++) {
if (passes(ans, test_strs)) {
printf("FOUND: ");
for (int k = 0; k < ANSW_LEN; k++) {
putchar(ans[k]);
}
putchar('\n');
break;
}

// increment base-6 counter in digits[], update ans[] lazily
for (int pos = ANSW_LEN - 1; pos >= 0; pos--) {
if (++digits[pos] < l_alpha) {
ans[pos] = alphabet[digits[pos]];
break;
}
// carry
digits[pos] = 0;
ans[pos] = alphabet[0];
}
}

return 0;
}[/spoiler]

~~ edit ~~

oh, and the order of the string it spits out is:
Pumpkin, Flyer Cart, Frag with peaks, Pond, Flag with hour glass, Bananas, Fire hydrant, Lizard, Broccoli, Flag with heart, Marker/tube/rocket thing, Grapes.
Last edited by Womp Womp; May 22 @ 8:19pm
Caleb was onto something though. Red is OP
Originally posted by Womp Womp:
Marker/tube/rocket thing,
Those are blueprints.
< >
Showing 1-4 of 4 comments
Per page: 1530 50