easy_solve: Solve easy sudokus

View source: R/easy_solve.R

easy_solveR Documentation

Solve easy sudokus

Description

This function is designed strictly to solve easy sudokus ie. ones with more than 36 clues, but it can sometimes solve medium hard sudokus (27 to 36 clues).

Usage

easy_solve(board)

Arguments

board

The 9 by 9 sudoku grid in form of a numeric matrix.

Details

It solves the sudoku deterministically and might be faster than solve_sudoku(), but it has two major drawbacks: can't determine if a sudoku is solvable and can't also determine if it can solve a given sudoku. If it takes more than 2 seconds please use solve_sudoku().

Use carefully.

Value

if sudoku is solvable it returns TRUE

See Also

solve_sudoku()

Examples

b2 <- sample_boards()[[2]]
easy_solve(b2)

KennedyMwavu/SudokuR documentation built on Jan. 2, 2023, 9:07 p.m.