Skip to content

ashfrench/killer-sudoko

Repository files navigation

Killer Sudoku Solver


https://ashfrench.co.uk/

https://ashfrench.co.uk/

Ash at Stack Overflow

LinkedIn : https://www.linkedin.com/in/ash-french-tamil

Medium : https://medium.com/@ash.french.tamil

Substack : https://substack.com/@ashfrenchtamil

Patreon : https://www.patreon.com/AshFrenchTamil


Kotlin CI with Gradle Quality Gate Status


Table Of Contents

This is a rewrite in kotlin of my Computer Science dissertation project. I Studied Computer Science with a Year in Industry (2006-2010) with IBM (2008-2009) at Manchester University. I achieved a 1st class honours for this project and was in the top 10 of the year.

The goals of this project is to be able to take any Killer Sudoku Grid and then be able to solve them from said grid.

I should be able to demonstrate solving by brute force, but also be able to solve using human techniques.

The human provided techniques should also be able to graphically display or verbally describe how to solve said Sudoku Grid

I will be using https://sudoku.com/ as a source of data to test my algorithms

Classic sudoku has been around for years and can easily be solved through brute force. The aim of this project is to show and demonstrate how to solve example puzzles. Show techniques and provide solutions.

A simple brute force algorithm will be provided to show how to solve a well-posed puzzle

Further algorithms will be provided with a human style UX to help the user learn how to solve the puzzles

Example Sudoku Grid

The objective is to fill the grid with numbers from 1 to 9 in a way that the following conditions are met:

  • Each row, column, and nonet contains each number exactly once.
  • The sum of all numbers in a cage must match the small number printed in its corner.
  • No number appears more than once in a cage. (This is the standard rule for killer sudokus, and implies that no cage can include more than 9 cells.

Example Sudoku Grid

Tooling

Kotlin Gradle HTML5 Java JUnit 5 Markdown SonarQube

How to Build and Run

./gradlew build

Internal Code

The way you can listen to any updates for a grid will return any CellUpdates which all have a unique ID, so you can check which have been processed already.

I will try to make optimisations that I think can be added from LibreSudoku

import kotlinx.serialization.Serializable

@Serializable
sealed class CellUpdate : UpdateID

References

Useful links for the project status and tracking

Miscellaneous

License: GPLv3

Links

  1. https://www.ibm.com
  2. https://www.cs.manchester.ac.uk/
  3. https://en.wikipedia.org/wiki/Brute-force_search
  4. https://en.wikipedia.org/wiki/Killer_sudoku#Solving_strategies
  5. https://sonarcloud.io/summary/overall?id=ashfrench_killer-sudoko
  6. https://kotlinlang.org/
  7. https://gradle.org/
  8. https://www.oracle.com/java/technologies/downloads/
  9. https://www.jetbrains.com/lp/compose-multiplatform/
  10. https://junit.org/junit5/docs/current/user-guide/#extensions
  11. https://github.com/users/ashfrench/projects/1/views/1
  12. https://html.com/html5/
  13. https://www.markdownguide.org/cheat-sheet/
  14. https://junit.org/junit5/docs/current/user-guide/
  15. https://en.wikipedia.org/wiki/Well-posed_problem
  16. https://qodana.cloud/projects/3dBJ8/reports/RwegE
  17. https://gitlab.com/opensudoku/opensudoku
  18. https://github.com/kaajjo/LibreSudoku

Return to Top

Security Policy

About

Killer Sudoku Solver

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages