Edward Cheng

Thursday, July 3, 2008

sudoko

darkroom is closed on the week. so besides editing down i'm doing random things.

some coworkers bring in a free paper every morning. mostly smutty news about pop tarts gone bad. in there is a basic crossword puzzle and sudoku. the crossword isn't too challenging but sometimes amusing. the sudoku ranges from ridiculously easy to how did i miss that.

i can take care of most puzzles given enough time. i have enough small tricks to get going. so with a bit of time the thing to do is to write myself a sudoku solver. there are already plenty of them online. it's not too difficult, the hard part is to logiscally think about the process of filling out and eliminating numbers. and then after that to reduce the logic to more basic functions.

but now that i've done this, i won't have to work on another sudoku ever again.

voila

2 Comments:

Anonymous Anonymous said...

nice. what lang did you write it in? perl?

July 3, 2008 1:49 PM  
Blogger Edward Cheng said...

perl. it's only about 400 lines or so and there are only 4 rules in there. i think it can solve most weekday newspaper sudoku problems.

spent today working out by hand with a post sudoku. i only got as far as the program did. so i know i am missing something. there is still more to learn.

this one

July 5, 2008 11:09 PM  

Post a Comment

<< Home