
Versatile library for generating Sudoku puzzles with customizable algorithms, grid sizes, and difficulty levels. Features innovative puzzle creation techniques and extensive permutation diversity.
🧩 Sudoklify is a versatile and intuitive Sudoku puzzle generation library written in Kotlin. It provides a comprehensive set of tools and algorithms for generating Sudoku puzzles of various grid sizes and difficulty levels.
solver package, including use cases and examples.Sudoklify reimagines the way Sudoku puzzles are generated, delivering a lightning-fast experience without compromising quality. Here's a glimpse into what makes Sudoklify stand out:
Traditional Sudoku generators rely on gradually removing numbers from a solved grid, often requiring extensive time and backend resources. Sudoklify, however, operates differently. It starts with a solvable "seed" puzzle and applies a series of ingenious transformations to craft new puzzles. This approach ensures rapid puzzle creation without the need for a complex backend infrastructure.
Every seed used by Sudoklify unlocks a staggering number of unique puzzles—over 2.4 trillion! To put this into perspective, if you were to solve a puzzle every 3 minutes, it would take more than 13 million lifetimes to exhaust a single seed. 🎉
Sudoklify leverages a diverse set of transformations to create distinctive puzzles:
Combining these transformations results in a staggering number of permutations per seed—2,437,996,216,320. This extensive variety guarantees that each puzzle is a uniquely captivating challenge. 🧠🧩🚀
To generate Sudoku puzzles using Sudoklify, follow these steps:
SudoklifyArchitect instance. This allows you
to load preset schemas and optionally add your own custom schemas.val architect = SudoklifyArchitect {
SudokuSchemas(loadPresetSchemas()) {
// TODO Optional: Add own schemas using add(*), addAll(*)
}
}SudokuSpec to specify the puzzle's seed, grid
dimension, and difficulty level.val sudokuSpec = SudokuSpec {
seed = 2024L.toSeed()
type = Dimension.NineByNine
difficulty = Difficulty.EASY
}SudoklifyArchitect to construct Sudoku puzzles based on
the defined specifications.val sudokuPuzzle1 = architect.constructSudoku(sudokuSpec)
val sudokuPuzzle2 = architect.constructSudoku {
seed = 2025L.toSeed()
}val puzzles = listOf(sudokuPuzzle1, sudokuPuzzle2)
puzzles.forEach { puzzle ->
println(puzzle.generateGridWithGivens().mapToSudokuString())
println(puzzle.generateGridWithGivens().mapToSudokuString().mapToSudokuBoard(puzzle.type))
}Sudoklify is now available as a Kotlin Multiplatform project, supporting the following platforms:
Contributions to Sudoklify are welcome! If you have any ideas, bug reports, or feature requests, please open an issue or submit a pull request. For more information, please refer to our Contributing Guidelines.
Support it by joining stargazers for this
repository. ⭐
Also, follow me on GitHub for my next creations! 🤩
Designed and developed by 2023 teogor (Teodor Grigor)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.🧩 Sudoklify is a versatile and intuitive Sudoku puzzle generation library written in Kotlin. It provides a comprehensive set of tools and algorithms for generating Sudoku puzzles of various grid sizes and difficulty levels.
solver package, including use cases and examples.Sudoklify reimagines the way Sudoku puzzles are generated, delivering a lightning-fast experience without compromising quality. Here's a glimpse into what makes Sudoklify stand out:
Traditional Sudoku generators rely on gradually removing numbers from a solved grid, often requiring extensive time and backend resources. Sudoklify, however, operates differently. It starts with a solvable "seed" puzzle and applies a series of ingenious transformations to craft new puzzles. This approach ensures rapid puzzle creation without the need for a complex backend infrastructure.
Every seed used by Sudoklify unlocks a staggering number of unique puzzles—over 2.4 trillion! To put this into perspective, if you were to solve a puzzle every 3 minutes, it would take more than 13 million lifetimes to exhaust a single seed. 🎉
Sudoklify leverages a diverse set of transformations to create distinctive puzzles:
Combining these transformations results in a staggering number of permutations per seed—2,437,996,216,320. This extensive variety guarantees that each puzzle is a uniquely captivating challenge. 🧠🧩🚀
To generate Sudoku puzzles using Sudoklify, follow these steps:
SudoklifyArchitect instance. This allows you
to load preset schemas and optionally add your own custom schemas.val architect = SudoklifyArchitect {
SudokuSchemas(loadPresetSchemas()) {
// TODO Optional: Add own schemas using add(*), addAll(*)
}
}SudokuSpec to specify the puzzle's seed, grid
dimension, and difficulty level.val sudokuSpec = SudokuSpec {
seed = 2024L.toSeed()
type = Dimension.NineByNine
difficulty = Difficulty.EASY
}SudoklifyArchitect to construct Sudoku puzzles based on
the defined specifications.val sudokuPuzzle1 = architect.constructSudoku(sudokuSpec)
val sudokuPuzzle2 = architect.constructSudoku {
seed = 2025L.toSeed()
}val puzzles = listOf(sudokuPuzzle1, sudokuPuzzle2)
puzzles.forEach { puzzle ->
println(puzzle.generateGridWithGivens().mapToSudokuString())
println(puzzle.generateGridWithGivens().mapToSudokuString().mapToSudokuBoard(puzzle.type))
}Sudoklify is now available as a Kotlin Multiplatform project, supporting the following platforms:
Contributions to Sudoklify are welcome! If you have any ideas, bug reports, or feature requests, please open an issue or submit a pull request. For more information, please refer to our Contributing Guidelines.
Support it by joining stargazers for this
repository. ⭐
Also, follow me on GitHub for my next creations! 🤩
Designed and developed by 2023 teogor (Teodor Grigor)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.