My solution for andriods:
?lvl=17&code=c12:10f3;g10:3f3;p10:4f0;g10:5f3;p10:6f3;c10:7f3;q10:8f3;g11:4f0;g11:6f0;q11:8f1;p12:4f3;c12:5f3;c12:6f3;c12:7f3;c12:8f3;c12:9f3;c11:9f2;c10:9f2;
It works by first checking if the first one is blue, if so, add a green counter, then count blues and add greens until red is reached, discarding when red can't be found, then count reds by adding greens, discarding when a blue is found, when done it checks the number of greens. If this number is even the robot is valid, else it is invalid.
I can clear 7000 easily, most efficient way is flying at 3% resistance and keeping the speed between 175 and 200 for as long as possible. Keep the 3% until the very end to avoid losing speed by dipping, gets you another 10 metres.