10
\$\begingroup\$

Where's Waldo is a searching game where you are presented an image of some scene, and your goal is to find a man named Waldo in the picture.

Here are a couple pictures showing what Waldo looks like. He always wears a red and white striped sweater and hat, blue pants, brown shoes and hair. He can be with or without accessories such as a camera, glasses, or a cane.

And here are some of the scenes where Waldo is hidden. (You can right click the images and go to the image source for higher resolution.)


The Challenge

Write a program that processes the images (provided as input however you like) and finds Waldo in as many of the above five images as possible. Your program is scored using the following formula

codeLength / numberOfPicturesInWhichWaldoIsFound

and, of course, the lower the score, the better.

\$\endgroup\$
  • 1
    \$\begingroup\$ Note How do I find Waldo with Mathematica? and How to find Waldo with R? on Stack Overflow. \$\endgroup\$ – dmckee --- ex-moderator kitten Feb 12 '12 at 18:10
  • 5
    \$\begingroup\$ @PeterOlson I know, but this place is notorious for rules-lawyering! \$\endgroup\$ – PhiNotPi Feb 12 '12 at 18:15
  • 3
    \$\begingroup\$ What output do you want? Coordinates or a circle of some kind? What is the required tolerance? It is trivial to draw a box that is guaranteed to contain waldo. \$\endgroup\$ – captncraig Feb 17 '12 at 23:15
  • 2
    \$\begingroup\$ Voting to close because this question is eliciting only joke answers. I also think it's poorly specified as to what the required output is supposed to look like. \$\endgroup\$ – Steven Rumbalski Feb 21 '12 at 15:20
  • 1
    \$\begingroup\$ Also voting to close, image processing is complex and getting something that even tries to find the image is a large, complex program which defeats the idea of code golf. And then you've got scaling and flipping and multiple images to check. It's hard enough for humans to do it and we've got specialised facial recognition hardware built in! \$\endgroup\$ – Skizz Feb 22 '12 at 11:29
12
\$\begingroup\$

Shell script, score 30/5 = 6

Since there's no specification on what comprises finding Waldo (i.e. how exact the location must be specified), I figure this program should give a rather good score, finding Waldo in every one of those pictures.

echo Waldo is in the picture.
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ -1: meta.codegolf.stackexchange.com/a/1070/9498 \$\endgroup\$ – Justin May 4 '14 at 6:22
  • 2
    \$\begingroup\$ @Quincunx: 2014-02-23 is much later than 2012-12-21, isn't it? (Also note the "no longer funny" in the title of that meta item). Anyway, I'm not sure that criterion applies to my answer anyway (you should have selected "hard-coding the output" instead; this would at least unconditionally apply, although it still suffers from the after-the-fact issue). \$\endgroup\$ – celtschk May 4 '14 at 11:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.