The Da Vinci Code Quest: Final Challenge - Solved in 5 minutes

I've just solved in ~5 minutes the Final Challenge on Google's Da Vinci Code Quest. You can view a video of my solution below, at Google Video or on YouTube.



The movie is not accelerated and was shot using Camtasia Studio.


Did I cheat?


Where is the limit between cheating and not cheating? Some have apparently reverse engineered the Flash code behind the puzzles to basically tell the Sony servers that the puzzle was completed ("this.onPuzzleCompleted();"). Others actually took the time to solve the chess challenge instead of brute-forcing it.

If you want to win, you have to cheat somehow. Assuming that reverse engineering the code would disqualify you, the only method left is to employ some sort of automation tool (unless you have a savant acquaintance) to solve the puzzles. This in turn requires an extra finalist account to test your tool, unless you want to risk sending multiple solutions from your real account. I'd like to thank Aaron Froehlich for promptly delivering the credentials for his finalist account.

Once you have a dummy account, you can play with it however you want and take each puzzle as many times as you need. You'll quickly observe that out of the 5 puzzles, the first 4 always start with the same configuration, so you can use some software to record mouse movement and clicks, input your solution then play back the recorded sequence automatically, at high speed, on the real account.

I used Macro Express and quickly noticed that there's a limitation as to how fast you can have the mouse move around and click. The puzzles make use of some fancy animation that may delay things.

Let's see how automating works for the 4 puzzles.

Sudoku: if you drag away a Sudoku symbol from the roster to the table, it will take more than 1 second for the same piece to show up in the vacated spot in the roster. The best solution I found was to maximize the period between dragging the same symbol twice to the table. I dragged, in sequence, each of the 9 different symbols to their location on the table, then restarted the sequence. This worked rather well, but the symbols are distributed a bit unevenly:

  • only 3 chalices
  • 4 fleurs-de-lis
  • 5 or 6 of the others

This is why at the end of the Sudoku puzzle you'll see that I had to lower the playback speed to only about twice "real-time".

Painting restoration: from numerous trials, it turned out that there needed to be a 180ms or longer pause before and after clicking a paint splotch, in order for the puzzle to recognize it was clicked. Then there is some animation when you click the second splotch, and until that animation is over, you can't click the newly formed splotch.

Curator challenge (arrange paintings): pretty straightforward if you don't over-accelerate playback.

Chess challenge: no real need for mouse automation on this one; you just have to click 2, 2, and 4, and the animation is much slower than a normal human would move a healthy mouse :)

Now the jigsaw puzzle, that's a totally different business. Different each time, that is. Recording macros won't help here. There are still a few things that I found:

  • if you drop a puzzle piece over its proper location, it will remain stuck there. This means you can bruteforce the positions of each puzzle piece
  • naturally, you start with the pieces in the corners and edges. The right edge has a nice property: you can't drag a piece with your mouse beyond that edge. This means you have less pinpointing to do when guessing a puzzle piece's place.
  • if you use the dummy account to watch the shifting images on the pieces for sufficient time, you'll create mental pictures of the target puzzle.


After watching my solution movie, I saw that I missed some obvious piece matches, so I'm confident someone out there does have a better time than mine (5 minutes).

I don't mind not winning. I was not a fan of the book and didn't become one after seing the movie. But for shaking Christianity's beliefs and for exposing the fears of some fundamentalist groups, I appreciate Dan Brown's work.

A quote by Robert Pirsig comes to mind:
People are never fanatic about what everyone is sure of. They're fanatic about matters that are in doubt.

Comments

Anonymous said…
Well I agree that it's a good thing to annoy the fundies. But as far as shaking Christianity's foundations, I disagree totally. The DVC was a work of fiction and beyond that everything else you read about the Holy Grail is rank speculation.

Religions have articles of faith that people believe in unconditionally and without proof of any kind. So if you want to equate religion with Grail myth then you could do that on some level. Religion, however, has the stated goal (not realized often enough) of trying to get people to be better persons. No dumb legend about lost gospels and fictitious messages left behind by Leonardo de Vinci can say the same thing.
Anonymous said…
"Did I cheat? Where is the limit between cheating and not cheating?" - Oh, its in the rules

"I'd like to thank Aaron Froehlich for promptly delivering the credentials for his finalist account."

You logged into another account.

From Rules:
Limit one (1) Entry/Google ID per person/email address for the entire Contest Period. Any attempted form of participation into this Contest other than as described herein is void.
Anonymous said…
I never said that your religious orientation had anything to do with your criticisms on the book.
Jason said…
I definitely solved that puzzle part faster...but, alas, I did not use an automation tool which is why your overall time is less than mine.
Anonymous said…
Dan,

Great work on the automation, which might be against the rules, but was well executed anyway. I've got 2 questions though.

1. Don't you think that posting in a blog that you used 2 accounts will disqualify you, since it's against some bolded parts of the rules?

2. Are you a resident of the US after moving to california in 2004? I thought the rules said someting about that.

By the way, does anyone have a link to the rules, or the entire text? I can't find them anymore.
Unknown said…
dude... your solution rocks!
Anonymous said…
http://flash.sonypictures.com/movies/davincicodequest/us/rules/
Anonymous said…
I think it might be important to address the two very distinct differences between the Bible and Dan Brown's work:

1. The Bible (as with other religious texts) was compiled together to provide a guide in a sense towards developing one's own individual spirituality through stories and examples of Jesus (an historical figure). As many educated theologians would tell you it's not meant to be a historical text book or a Step-By-Step instruction manual. Anyone who sees it as a completely reality based, literal text is grossly mistaken.

2. Dan Brown's book is entertainment. Pure and simple. Which means it contains inaccuracies and wouldn't necessarily have to be credible. I would be hard-pressed as well to believe that it would ever win a Nobel prize. Anyone who believes it is more is again, grossly mistaken.

If one actually studies the Bible for its content they would discover it never actually attempts to integrate reality. It uses elements of reality to relate on the individual level.

One of the great advantages of being a human and capable of communication is our ability to extract reality from fiction. Perhaps Dan Brown simply tapped into a very common inquiry that we all share, the need to explain the seemingly unexplainable. But either way, is there really even a point to the book?

What makes any work great is not just its content, but its purpose. And to me the "Da Vinci Code" has no purpose. As for the science behind the book I'd like to see someone take the time to criticize the James Bond films. Those are filled with perverted and abused science.

By the way, when you compare the Bible (a religious text) to the "Da Vinci Code" (a work of fiction) you are brining your personal beliefs (or lack thereof) into your criticism of the book.
Anonymous said…
I applaud your efforts here, but your video hardly qualifies as a representation of the fastest possible time.

The restoration puzzle lost about 4 seconds due to one mis-click at the end, and several earlier choices to move the mouse farther than necessary to get to the next step.

Much more importantly, the jigsaw puzzle was solved quite slowly.

If every step of the first two puzzles is memorized and mentally practiced ahead of time, AND if no mistakes are make during the solutions AND if some good luck/good technique is applied to the final jigsaw, the 5 puzzles can be solved in under 4 minutes without automation.

But you absolutely do need all the solutions ahead of time, so all entries under five minutes are bending the rules, if not outright breaking them.
Dan Dascalescu said…
Some responses to Michael and anonymous posters:

OK, looks like I was cheating by logging into two accounts. At that point I can claim that a friend of mine used Aaron's account and I only learned the puzzle images... Now seriously, who would be able to solve the jigsaw puzzle at first sight in under 4 minutes?

Indeed, after watching my own video, I missed some really obvious piece matches in the puzzle anyway.

Solving the challenge, using automation, hunting forums for solutions - that was FUN! I can live without winning (and without paying ~$40k in taxes :-)

Of course I'm a legal US resident (I have an H1-B visa).

As for the Bible debates, I would not go into those in a blog comment... If you live around the Bay Area, we could meet for coffee (or more likely for a very long hike :-)

Finally, I'd like to thank everyone for their time and for the the very high quality of their comments. I hope reading my blog was an enjoyable time!
Anonymous said…
I'm just glad to miss out on that 9x9 sudko! What a pain! Best of luck for thinking outside the box and I hope you win.
rama said…
Hullo, you might be interested in visiting this blog whoch is about crypt-cracking.
http://cryptcracker.blogspot.com

rama