4 ms·
Since the author spent so much time on the optical character recognition step, it's worth mentioning that you don't even really need OCR for this task. You can
by bnjmn 9y ago
Since the author spent so much time on the optical character recognition step, it's worth mentioning that you don't even really need OCR for this task.
You can just find the squares, group the characters in the squares into visual equivalence classes, assign each class an arbitrary number, solve the puzzle in terms of those numbers, then fill in each empty square with the (average?) image of the equivalence class it matches.
This would allow you to solve a Sudoku puzzle with letters or WingDings instead of numbers, and the output font would naturally match that of the original puzzle.
- yeldarb 9y agoThat's an interesting idea! What happens if the source puzzle doesn't have all of the digits present though?
- gok 9y agoUsing OCR means you can solve a Sudoku with some printed and some hand-written numbers though.
- spaceheeder 9y agoIf the app still wanted to support puzzles that had notes scribbled in them then it would need some kind of OCR to tell the difference between a "starter" cell with known-good data and "puzzle" cells it needs to solve. But treating the symbols in the starter cells as arbitrary is ingenious, imo!