1 Harmony Search Algorithm for Solving Sudoku Zong Woo Geem Johns Hopkins University, Environmental Planning and Management Program, 729 Fallsgrove Drive #6133, Rockville, Maryland 20850, USA geem@jhu.edu Abstract. Harmony search (HS) algorithm was applied to solving Sudoku puz- zle. The HS is an evolutionary algorithm which mimics musicians ’ behaviors such as random play, memory-based play, and pitch-adjusted play when they perform improvisation. Sudoku puzzles in this study were formulated as an op- timization problem with number-uniqueness penalties. HS could successfully solve the optimization problem after 285 function evaluations, taking 9 sec- onds. Also, sensitivity analysis of HS parameters was performed to obtain a better idea of algorithm parameter values. 1 Introduction Sudoku, which is Japanese term meaning “singular number,” has gathered popula r- ity in Japan, the UK, and the USA. The Sudoku puzzle consists of 9 × 9 grid and 3 × 3 blocks for all the 81 cells. Each puzzle, which has a unique solution, has some cells that have already been filled in. The objective of the puzzle is to fill in the re- maining cells with the numbers 1 through 9 so that the following three rules are satisfied: • Each horizontal row should contain the numbers 1 - 9, without repeating any. • Each vertical column should contain the numbers 1 - 9, without repeating any. • Each 3 × 3 block should contain the numbers 1 - 9, without repeating any. In recent years researchers have started to apply various methods such as graph theory [1], artificial intelligence [2], and genetic algorithm [3] to solve the Sudoku puzzle. Eppstein [1] used the transformation from a directed or undirected graph to an unlabeled digraph to solve the puzzle. Although it was successful to the undirected case, the method is not successful to a directed one because the latter is NP-complete [4]. Caine and Cohen [2] proposed an artificial intelligent model named MITS (Mixed Initiative Tutoring System for Sudoku), in which the tutor takes the initiative to interact when the student lacks knowledge and makes moves that have low utility. Nicolau and Ryan [3] developed a system named GAuGE (Genetic Algorithm using Grammatical Evolution) for Sudoku, which uses a position independent representa-