Skip to content

Instantly share code, notes, and snippets.

View tarvaina's full-sized avatar

Antti Tarvainen tarvaina

View GitHub Profile
@tarvaina
tarvaina / sudoku.py
Created June 22, 2020 06:08
Recreating Peter Norvig's Sudoku solver from memory
"""
I've always found Peter Norvig's Python solver for Sudoku at https://norvig.com/sudoku.html very elegant.
It had been a few years since I visited the page and I decided I would try to recreate it from memory.
I got pretty close!
The major difference is that my solution is missing one of the two propagation strategies.
Search works without it so I thought Norvig's solution might not use it.
Turns out I was wrong and it did have it.
Another difference is that Norvig's code is much better documented at the page https://norvig.com/sudoku.html .
@tarvaina
tarvaina / _.md
Created January 28, 2014 17:13
ball
@tarvaina
tarvaina / _.md
Created September 12, 2013 16:31
Grids
@tarvaina
tarvaina / _.md
Created September 12, 2013 12:12
Time
@tarvaina
tarvaina / _.md
Created September 11, 2013 06:53
Tributary inlet
@tarvaina
tarvaina / _.md
Created September 10, 2013 14:55
Coffeescript practice
@tarvaina
tarvaina / _.md
Created September 10, 2013 10:37
Tributary inlet
@tarvaina
tarvaina / _.md
Created August 22, 2013 14:44
Crossfilter practice
@tarvaina
tarvaina / _.md
Created August 14, 2013 16:23
Rawr chart
@tarvaina
tarvaina / _.md
Created August 14, 2013 13:15
Rubenin ja Rasmuksen olio