Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Re: Solving Every Sudoku Puzzle - http://norvig.com/sudoku...
"Good suggestion -- the only way to tell if it is really faster is to run some timing experiments." - Peter Norvig
Re: Solving Every Sudoku Puzzle - http://norvig.com/sudoku...
"Good point!  The naive search algorithm you describe is indeed simpler, both in terms of lines of code and in conceptual complexity.  And for many puzzles, it arrives at the solution in less than a second, so it has a lot to recommend it.  But for other puzzles, it takes many minutes.  Consider the puzzle I show above, which you would encode as [4, 0, 0, 0, 0, 0, 8, 0, 5,  0, 3, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 7, 0, 0, 0, 0, 0,  0, 2, 0, 0, 0, 0, 0, 6, 0,  0, 0, 0, 0, 8, 0, 4, 0, 0,  0, 0, 0, 0, 1, 0, 0, 0, 0,  0, 0, 0, 6, 0, 3, 0, 7, 0,  5, 0, 0, 2, 0, 0, 0, 0, 0,  1, 0, 4, 0, 0, 0, 0, 0, 0] I started to run this with your code, but after 20 minutes it still hadn't completed and I interrupted the process. The algorithm I describe is over 10,000 times faster on hard puzzles like this.  That's why I dismissed the naive search approach, although I should have covered it in my article." - Peter Norvig
Photo by Noah Berger
Photo by Noah Berger
You both a so cool! - Valentina Vaneeva
Re: (How to Write a (Lisp) Interpreter (in Python)) - http://norvig.com/lispy...
"Thank you for doing the translation.  I appreciate it." - Peter Norvig
"Thanks, nnamdi; I knew there were some issues with autofocus on Nikon, but didn't know the details.  I've swapped in compatible lenses.  But maybe I should just recommend stepping up to a D7000." - Peter Norvig
Re: Dance Photography - http://norvig.com/dance-p...
"stolen data, I admit I am an amateur with a lot yet to learn. I'm no Lois Greenfield.  But I've done about two dozen shows over the last 7 years, and my audience seems to be happy enough with the results: they view about 20 to 40 thousand images each show and the most popular images get 50 to 100 downloads at full size, indicating that the viewers want to reproduce them as 8x10s or so, not just share a thumbnail on facebook. To me that is the practical experience that counts; I'm sorry I don't measure up to your standards." - Peter Norvig
Re: Dance Photography (Steps 5-9) - http://norvig.com/dance-p...
"Flash is not allowed at our study, so I didn't discuss it." - Peter Norvig
Re: (How to Write a (Lisp) Interpreter (in Python)) - http://norvig.com/lispy...
"You are right -- we are relying on many features of Python: call stack, data types, garbage collection, etc. The next step would be to show a compiler to some sort of assembly language.  I think either the Java JVM or the Python byte code would be good targets.  We'd also need a runtime system with GC. I show the compiler in my PAIP book." - Peter Norvig
Re: Solving Every Sudoku Puzzle - http://www.norvig.com/sudoku...
"Thanks to the pointer.  People who want a very efficient Sudoku solver should indeed look at the dancing links algorithm, and other methods of implementing the all-different constraint in CSP.  But for this article, I was going for the simplest reasonable method, not the most efficient.  I'll have an article coming out in Code Quarterly soon that goes into more detail on efficiency; it is paired with an article covering dancing links." - Peter Norvig
Toucan
Black-Collared Hawk
Kingfisher
Show all
Laura Norvig's brother is quite a photographer. - Bruce Lewis
http://pn.smugmug.com/Nature... is amazing. You are very talented. - Benjamin Golub
LOL @ Bruce. INORITE? I really like your choice in curating your photos, Peter, and the way you seem to capture emotions and interactions between animals, not just classic shots. - Laura Norvig
Re: On Chomsky and the Two Cultures of Statistical Learning - http://norvig.com/chomsky...
"Maybe you had a cache refresh problem with your browser. Look again. You'll see: Now let's consider the non-statistical model of spelling expressed by the rule "I before E except after C." Compare that to the probabilistic, trained statistical model:P(IE) = 0.0177 P(CIE) = 0.0014 P(*IE) = 0.163 P(EI) = 0.0046 P(CEI) = 0.0005 P(*EI) = 0.0041 This model comes from statistics on a corpus of a trillion words of English text. The notation P(IE) is the probability that a word sampled from this corpus contains the consecutive letters "IE." P(CIE) is the probability that a word contains the consecutive letters "CIE", and P(*IE) is the probability of any letter other than C followed by IE. The statistical data confirms that IE is in fact more common than EI, and that the dominance of IE lessens wehn following a C, but contrary to the rule, CIE is still more common than CEI. Examples of "CIE" words include "science," "society," "ancient" and "species." The disadvantage of the "I before E except..." - Peter Norvig
Re: On Chomsky and the Two Cultures of Statistical Learning - http://norvig.com/chomsky...
"I updated the text to show explicitly how the probability computations are done.  And I note that the probabilities are for word tokens, not types -- that is, a common word like "pie" counts more than an uncommon word like "acromegalies"." - Peter Norvig
Re: Solving Every Sudoku Puzzle - http://norvig.com/sudoku...
"I'm glad you enjoyed the essay, and even more glad that it helped inspire you to create a program of your own.  You could publish it on a blog of your own, and/or on a code-hosting site like github or code.google.com/projecthosting .  A maximum of .01 seconds is excellent; congratulations. I did a version in Java (which I will write about later) that has a worst-case time of .03 seconds, after testing on 100,000 examples.  But be careful: if I only test on 1000 examples, the worst time is .0006 seconds -- the maximum time is highly skewed, depending on the number of boards you test.  (My average rate was 40,000 boards per second.)" - Peter Norvig
Re: On Chomsky and the Two Cultures of Statistical Learning - http://norvig.com/chomsky...
"By testing the rule against a dictionary of all words, looking at the ones that contain an "ie" or "ei."  I forget whether the 20% figure was for when you count each word once, or for when you weight each word according to the frequency of usage, but both numbers are similar enough that I decided it wasn't worth listing them both." - Peter Norvig
Introduction to Artificial Intelligence - http://www.ai-class.org
Sebastian Thrun and I are teaching an AI class online; 126,000 people have signed up so far. - Peter Norvig
will you be using Google moderator to vet students' questions? (isn't that a labs product slated to be axed?) - Laura Norvig
"Sarah Connor?" "Yes." - Josh Haley from iPhone
Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis - http://blogs.scientificamerican.com/at-scie...
My thoughts on a 1966 Scientific American article that was my introduction to programming. And if you ever need a CPL compiler, this is a good place to start. - Peter Norvig
Dude. I wish Dad were around to see you get published in SA. Wow. - Laura Norvig
"If only Strachey the analyst and Strachey the programmer had iterated a few times, the article would have been even more of a work of beauty!" - Then you wouldn't have wrote a reply and we would be at a net loss. Wabi sabi? - Todd Hoff
Scientific American was always prominently displayed in my dad's study. And it wasn't just window dressing. He read it, Peter read it, and I always *tried* to read it. I would leaf through and see if maybe, just maybe, there was something in it that a layperson could grok. Sometimes there was. But not very often. Still, it stretched my brain. So, even though being on the front page of the NYT is pretty cool, I think being published in Scientific American is even cooler. - Laura Norvig
Other ways to read this feed:Feed readerFacebook