# Midcontest Analysis

Posted by Helen Chen,

### Wednesday, 5:30 PM EDT

Below we’ve included a brief analysis of some of the entries submitted so far. Visualizing the results, especially those of the competition, is a great way to find ways to improve the algorithms being used.

1.

Here are some pictures that illustrate how the algorithms work Our first example entry simply made random guesses and kept the best for its final guess. Note on the visualization: the guesses are shown with colored pixels on the left, and the score is shown with black and white pixels on the right. The correct answer is at the very top on the left, and the final guess appears just below it.
id = 13;
runpuzzle('slvExample',id,'Example Entry','MathWorks Contest Team')

2.

Our next example is the first from Benno Weber’s “alcohol series”. Notice that he cycles through all the colors initially. This approach is common to just about all the solvers. He picks a color and tries to find the column where it belongs.
runpuzzle('slvStupid',id,'slow and stupid','Benno Weber')

3.

John Stroebel’s approach below looks similar, but he picks a column and finds the correct color.
runpuzzle('slvStroebel1',id,'submission 1','John Stroebel')

4.

Here Stijn Helsen’s code shows the benefits of placing colors using a binary tree. He’s able to nail down the position for a given color in far less time.
runpuzzle('slvStijn1',id,'find colors+cbc with bt(5)','Stijn Helsen')

5.

This is our current leader (as of 5:30 PM EDT). Stijn is combining several of the techniques described above. Notice particularly that he’s getting double usage out of the initial color sort, placing the blue peg while searching for other colors.
runpuzzle('slvStijn2',id,'fcol with posfind(34)','Stijn Helsen')

### What’s next?

It will be interesting to see what ideas develop based on the techniques described here. Maybe we’ll see something new at the top for our 8:00 PM EDT “Work Late Wednesday” prize giveaway.

We’ll see you in the queue — The MATLAB Contest Team