The next order of business was to see how far we could get solving using only naked singles and hidden singles.
easy=[ [0,5,0,4,0,9,0,0,2], [4,0,0,6,0,0,0,7,0], [0,0,2,0,0,0,8,0,9], [0,0,0,0,3,0,0,0,7], [0,0,4,0,0,0,3,6,0], [0,0,0,0,2,0,0,0,4], [0,0,3,0,0,0,7,0,5], [1,0,0,3,0,0,0,2,0], [0,4,0,7,0,8,0,0,1]] gr=Grid(easy) gr.solve() 358|479|612 491|682|573 672|153|849 ---+---+--- 816|534|297 524|917|368 739|826|154 ---+---+--- 963|241|785 187|395|426 245|768|931 Score: 0 Sum: 405 Oh, ok. I guess I’ll keep going then.
moderate = [ [8,0,0,0,6,0,0,0,3], [0,0,2,0,0,0,4,0,0], [0,3,6,2,0,4,7,8,0], [0,0,1,3,0,7,5,0,0], [4,0,0,0,5,0,0,0,7], [0,0,8,1,0,6,2,0,0], [0,8,9,4,0,1,3,7,0], [0,0,4,0,0,0,8,0,0], [3,0,0,0,7,0,0,0,2]] Grid(moderate).solve() 847|569|123 192|783|456 536|214|789 ---+---+--- 921|347|568 463|852|917 758|196|234 ---+---+--- 689|421|375 274|635|891 315|978|642 Score: 0 Sum: 405 Oh.
I wasn’t able to get as much done today as I’d hoped, but I did get started with it. I’m doing my coding using Replit.com; you can see my code here: @KendraPendolino/UnlinedSeashellMineral. So, let’s see what we have so far.
I found a very easy sudoku puzzle to start with. Here it is as a two-dimensional array.
test = [ [0,0,6,9,0,1,2,0,0], [0,2,0,3,0,4,0,7,0], [1,0,0,0,7,0,0,0,8], [4,6,0,0,0,0,0,2,5], [0,0,3,0,0,0,7,0,0], [7,9,0,0,0,0,0,6,4], [6,0,0,0,3,0,0,0,7], [0,4,0,2,0,9,0,8,0], [0,0,8,7,0,6,5,0,0]] I made some game-day changes to the setup.