Example #1
0
def beginSingleBenchmark(filename):
    for method in implementedSolvingMethods:
        printing(False)
        startTime = time()
        kenken.main(puzzleDir + filename, method)
        stopTime = time()
        printing(True)
        print(filename + " solved in " + str(stopTime - startTime) + " seconds")
Example #2
0
def beginSingleBenchmark(filename):
    for method in implementedSolvingMethods:
        printing(False)
        startTime = time()
        kenken.main(puzzleDir + filename, method)
        stopTime = time()
        printing(True)
        print(filename + " solved in " + str(stopTime - startTime) +
              " seconds")
Example #3
0
def beginFullBenchmark():
    """
    Solves a series of KenKen puzzles, and times them, giving the times
    as puzzles are solved.
    """
    
    #FOLLOW THIS FORMAT FOR ADDING TESTS TO THIS BENCHMARKING FILE
    print("puzzles take longer and longer to solve, Ctrl-C may be necessary in time")
    for puzzle in fullBenchmarkPuzzles:
        for method in implementedSolvingMethods:
            currentPuzzle = "nyt6x6_05-01.kk"
            printing(False)
            startTime = time()
            kenken.main(puzzleDir + currentPuzzle, method)
            stopTime = time()
            printing(True)
            print(currentPuzzle + " solved in " + str(stopTime - startTime) + " seconds using " + method)
Example #4
0
def beginFullBenchmark():
    """
    Solves a series of KenKen puzzles, and times them, giving the times
    as puzzles are solved.
    """

    #FOLLOW THIS FORMAT FOR ADDING TESTS TO THIS BENCHMARKING FILE
    print(
        "puzzles take longer and longer to solve, Ctrl-C may be necessary in time"
    )
    for puzzle in fullBenchmarkPuzzles:
        for method in implementedSolvingMethods:
            currentPuzzle = "nyt6x6_05-01.kk"
            printing(False)
            startTime = time()
            kenken.main(puzzleDir + currentPuzzle, method)
            stopTime = time()
            printing(True)
            print(currentPuzzle + " solved in " + str(stopTime - startTime) +
                  " seconds using " + method)