This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ortools.linear_solver import pywraplp | |
import numpy as np | |
def solve(sudoku): | |
""" | |
Solve the sudoku passed | |
:param sudoku: a 9x9 sudoku field | |
:return: the completed 9x9 sudoku field | |
""" | |
# Create the model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
def remove_duplicate_candidates(N): | |
''' | |
Accept a list of candidate solutions (being binary lists) and make sure, each (element)-list is contained only once. | |
:param N: | |
:return: revised list containing no duplicate candidates | |
''' |
OlderNewer