Starting from the design and code below, I optimized as much as possible. Motor speed was already near maximum, so no real gain there. Some improvements include
Using 2 Mindstorms NXT kits and a webcam, this robot solves a standard 3x3 cube in about 19-23 seconds. First it scans all 6 sides of the cube with a simple Logitech webcam. This produces a string of 54 characters representing the cube. The string is sent to the cube explorer webserver which then uses a 2-phase algorithm to quickly respond with a short solution. This solution is parsed and converted to work with the mechanical setup of the robot.
Lego robot capable of solving an actual paper sudooku. The solution for the sudoku is calculated using a simple backtracking algorithm, filling in numbers from the top-left to bottom-right. When a number gives a conflict, it goes back one step and adds 1 to that number. Then proceeds again. Repeat until done. It takes only a fraction of a second to solve the entire puzzle. The solution is then sent to the NXT which starts writing down the numbers.
After looking at several free OCR libraries and getting bad results with them, I decided to write my own to recognize the preset numbers in the puzzle. After finding the bounding box of a number, it divides the box into a 5x3 grid. Next amount of dark and light pixels in each grid cells are counted. If more dark than light, the grid is filled. Resulting in a digital-number-like representation from which we can deduct the correct number.
Robot playing a real game of connect 4 against a human. And probably win.. A push button allows the robot to recalibrate after each move, to make sure it aligns with a column when making a move. The webcam continuously monitors the playing field, checking the lowest empty spot in each column. When it detects a colour in one of those spots, it knows it's his turn to make a move.
Late 2012 I finally decided to buy my first Mindstorms NXT to build some cool robots. This 2x2x2 solver is the first thing I built when I got the kit. It's made 100% out of LEGO, programmed in Java using the Lejos library. It takes about 2 minutes to scan and solve a cube. Start simple and work your way up :)
Line finding robot using a custom soldered array of 7 light sensors. Behind the scenes a PID algorithm makes sure the driving and turning is smooth. This robot placed 4th out of 28 participants in the 2012 Welek robot competition. Happy with the result as it was the first real robot I ever made. The robot was capable of navigating tiny corners and a complex course, including 90° corners. This of course at the expense of speed. Alas at the competition, a huge loop with only very smooth corners was used not show-casing the possibilitis of the robot :(
Video shows an early prototype navigating a test course in my dorm room.