67 research outputs found

    Metaheuristics can solve sudoku puzzles

    Get PDF
    In this paper we present, to our knowledge, the first application of a metaheuristic technique to the very popular and NP-complete puzzle known as ‘sudoku’. We see that this stochastic search-based algorithm, which uses simulated annealing, is able to complete logic-solvable puzzle-instances that feature daily in many of the UK’s national newspapers. We also introduce a new method for producing sudoku problem instances (that are not necessarily logic-solvable) and use this together with the proposed SA algorithm to try and discover for what types of instances this algorithm is best suited. Consequently we notice the presence of an ‘easy-hard-easy’ style phase-transition similar to other problems encountered in operational research

    Diversification and Intensification in Hybrid Metaheuristics for Constraint Satisfaction Problems

    Get PDF
    Metaheuristics are used to find feasible solutions to hard Combinatorial Optimization Problems (COPs). Constraint Satisfaction Problems (CSPs) may be formulated as COPs, where the objective is to reduce the number of violated constraints to zero. The popular puzzle Sudoku is an NP-complete problem that has been used to study the effectiveness of metaheuristics in solving CSPs. Applying the Simulated Annealing (SA) metaheuristic to Sudoku has been shown to be a successful method to solve CSPs. However, the ‘easy-hard-easy’ phase-transition behavior frequently attributed to a certain class of CSPs makes finding a solution extremely difficult in the hard phase because of the vast search space, the small number of solutions and a fitness landscape marked by many plateaus and local minima. Two key mechanisms that metaheuristics employ for searching are diversification and intensification. Diversification is the method of identifying diverse promising regions of the search space and is achieved through the process of heating/reheating. Intensification is the method of finding a solution in one of these promising regions and is achieved through the process of cooling. The hard phase area of the search terrain makes traversal without becoming trapped very challenging. Running the best available method - a Constraint Propagation/Depth-First Search algorithm - against 30,000 benchmark problem-instances, 20,240 remain unsolved after ten runs at one minute per run which we classify as very hard. This dissertation studies the delicate balance between diversification and intensification in the search process and offers a hybrid SA algorithm to solve very hard instances. The algorithm presents (a) a heating/reheating strategy that incorporates the lowest solution cost for diversification; (b) a more complex two-stage cooling schedule for faster intensification; (c) Constraint Programming (CP) hybridization to reduce the search space and to escape a local minimum; (d) a three-way swap, secondary neighborhood operator for a low expense method of diversification. These techniques are tested individually and in hybrid combinations for a total of 11 strategies, and the effectiveness of each is evaluated by percentage solved and average best run-time to solution. In the final analysis, all strategies are an improvement on current methods, but the most remarkable results come from the application of the “Quick Reset” technique between cooling stages

    Uma escala para medir a dificuldade dos quebra-cabeças de Sudoku

    Get PDF
    In the last few years, Sudoku has become a popular game, deserving the attention of many researchers. Most Sudoku puzzles are classified as easy, average and hard according to their degree of difficulty. However when asked about the criteria used to classify them, there is no clear answer. This paper presents a PnP (paper-and-pencil) method to solve and measure the degree of difficulty of Sudoku puzzles. Contrary to other methods, this method can classify the puzzles automatically without human intervention. The scale used here was inspired on the type of scale used in the snow trails: green, blue, red and black. The Sudoku puzzle is transformed to SAT, and its level is set depending on the SAT problem being easy or hard to solve in SAT, which is equivalent to the puzzle being solved using an easy or hard PnP method. A classifier and a set of classified Sudoku problems are made available on the web.Resumo: Nos Ășltimos anos, o Sudoku tornou-se um jogo muito popular, merecendo a atenção de muitos investigadores. A maior parte dos puzzles de Sudoku Ă© classificada como simples, mĂ©dia ou difĂ­cil, consoante o seu grau de dificuldade. Contudo, quando questionados acerca do critĂ©rio de classificação, nĂŁo existe uma resposta clara. Este artigo apresenta um mĂ©todo manual para medir o grau de dificuldade dos puzzles de Sudoku. Ao contrĂĄrio de outros mĂ©todos, este mĂ©todo classifica os puzzles automaticamente, sem intervenção humana. A escala utilizada Ă© inspirada na escala utilizada nas pistas de neve: verde, azul, vermelho e negro. O puzzle de Sudoku Ă© transformado num problema de SAT e o nĂ­vel de dificuldade Ă© dado pela resolução do problema de SAT, o qual Ă© equivalente ao da resolução manual. O classificador de dificuldade e um conjunto de puzzles de Sudoku classificados estĂŁo disponĂ­veis na Web.peerreviewe

    An Efficient Local Search for Partial Latin Square Extension Problem

    Full text link
    A partial Latin square (PLS) is a partial assignment of n symbols to an nxn grid such that, in each row and in each column, each symbol appears at most once. The partial Latin square extension problem is an NP-hard problem that asks for a largest extension of a given PLS. In this paper we propose an efficient local search for this problem. We focus on the local search such that the neighborhood is defined by (p,q)-swap, i.e., removing exactly p symbols and then assigning symbols to at most q empty cells. For p in {1,2,3}, our neighborhood search algorithm finds an improved solution or concludes that no such solution exists in O(n^{p+1}) time. We also propose a novel swap operation, Trellis-swap, which is a generalization of (1,q)-swap and (2,q)-swap. Our Trellis-neighborhood search algorithm takes O(n^{3.5}) time to do the same thing. Using these neighborhood search algorithms, we design a prototype iterated local search algorithm and show its effectiveness in comparison with state-of-the-art optimization solvers such as IBM ILOG CPLEX and LocalSolver.Comment: 17 pages, 2 figure

    Solving sudoku's by evolutionary algorithms with pre-processing

    Get PDF
    This paper handles the popular Sudoku puzzle and studies how to improve evolutionary algorithm solving by first pre-processing Sudoku solving with the most common known solving methods. We found that the pre-processing solves some of the easiest Sudoku’s so we do not even need other methods. With more difficult Sudoku’s the pre-processing reduce the positions needed to solve dramatically, which means that evolutionary algorithm finds the solution much faster than without the pre-processing.fi=vertaisarvioitu|en=peerReviewed

    Solving Sudoku with Ant Colony Optimization

    Get PDF
    In this paper we present a new algorithm for the well-known and computationally-challenging Sudoku puzzle game. Our Ant Colony Optimization-based method significantly out-performs the state-of-the-art algorithm on the hardest, large instances of Sudoku. We provide evidence that – compared to traditional backtracking methods – our algorithm offers a much more efficient search of the solution space, and demonstrate the utility of a novel anti-stagnation operator. This work lays the foundation for future work on a general-purpose puzzle solver, and establishes Japanese pencil puzzles as a suitable platform for benchmarking a wide range of algorithms
    • 

    corecore