Contains function to return refutation score of a Sudoku board to be used to calculate difficulty. Inspired by https://www.fi.muni.cz/~xpelanek/publications/flairs-sudoku.pdf Calculates difficulty based on the complexity of the what-if reasoning needed to solve the board. The what-if reasoning complexity is calculated by how many calculations are needed to determine if a candidate is valid. In addition to the what-if reasoning (which is refuting the possibility of other candidates) obvious and hidden singles are used along with related notes.

Hierarchy

  • Refutation

Constructors

Methods

Constructors

Methods

  • Returns the refutation score of the board.

    Returns

    The refutation score of the board.

    Parameters

    • board: Cell[][]

      2d Cell array representing the board.

    • solution: string[][]

      2d string array representing the solution.

    • boost: number

      Number between 0 and 1 that boosts performance by randomly skipping checking some cells (e.g. 0.6 skips 60% of cells)

    Returns number

Generated using TypeDoc