.. _f-sudoku: module ``special.sudoku`` ========================= Short summary +++++++++++++ module ``ensae_teaching_cs.special.sudoku`` This file proposes a simple algorithm to solve a Sudoku. It finds the first possible solution. :githublink:`%|py|5` Functions +++++++++ +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | function | truncated documentation | +========================================================================================+============================================================================================+ | :func:`chiffre_barre_carre ` | Look into every number in sub square *i, j*, if a number in it ``s[i][k]`` is not null, | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`chiffre_barre_colonne ` | Look into every number in column *j*, if the number in column *k* ``s[i][k]`` is not null, | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`chiffre_barre_ligne ` | Look into every number in line *i*, if the number in column *k* ``s[i][k]`` is not null, | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`meilleure_case ` | look over all empty place and pick the one with the least possible options | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`nombre_possible ` | tells for a particular position the list of possible number | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`resolution_sudoku ` | Solves the Sudoku. | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :func:`sudoku2str ` | Converts a sudoku into a string. | +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: ensae_teaching_cs.special.sudoku :members: :special-members: __init__ :show-inheritance: