Coursework & experiments · Algorithms & computing
Tested educational implementation — private source
- Context
- Coursework
- Maturity
- Tested educational implementation
- Evidence
- Locally verified
- Source
- Private source
- Ownership & provenance
- Joint course project — current contribution documented
Concurrent Samurai Sudoku solver — five and ten workers with verifiable replay
An educational Java application that solves one five-grid, 369-cell Samurai board and coordinates five- and ten-worker modes through a verifiable, replayable event log.

Problem and learning context
Samurai Sudoku combines five 9×9 Sudoku grids on one board. The centre grid overlaps the four surrounding grids, so the grids cannot be solved independently: a value in an overlap must satisfy both memberships. This work models those relationships as one constraint system and coordinates several search workers over the complete board.
Inputs and outputs
The input is a text file containing the givens for one Samurai board. After validating its structure and values, the application maps it to 369 physical cells, 36 of which are shared by two grids. The output is a complete solution that preserves the givens and satisfies every row, column and box in all five grids, together with an event log that can be checked and replayed for a selected worker.
How the solver works
- The application reads the board and rejects malformed dimensions, symbols or contradictory givens.
- It builds a membership map connecting each physical cell to the one or two grids it belongs to.
- Every worker receives an independent search state derived from the same input.
- The workers start together. Each makes its first decision at a designated anchor, then selects the globally most constrained unresolved cell across the complete Samurai board.
- The first worker to produce a valid solution publishes it atomically; the remaining work is cancelled and all submitted tasks are joined before the run ends.
- The winning board is validated again, and the winner's event stream can be replayed step by step.
Five- and ten-worker modes
Five-worker mode associates one worker with each grid. Ten-worker mode assigns two distinct anchors, and therefore two workers, to each grid. Workers do not share a mutable search board or merge assignments. They share only run coordination, winner publication, cancellation and immutable events. This isolates conflicting branches and keeps each worker's result independently inspectable.
Event log and replay
Each event records a contiguous sequence number, worker identity, elapsed time, cell, value and search depth. The importer treats a log as untrusted input and rejects gaps, regressing time, unknown workers and illegal cells or values. The interface shows the selected worker's anchor, current cell, backtracking and overlap regions. The interface captures on this page come from real runs on a synthetic puzzle.
Yahya's role and provenance
The work began as a joint course project. This page documents Yahya's contribution to the presented version: defining the overlap model and the concurrency and logging contracts, and reviewing the execution evidence.
Evidence and maturity
The application passed 36 acceptance tests covering 369 cells and 36 overlaps, malformed input, unique, multiple and unsatisfiable puzzles, worker termination, log mutation and replay. Both worker modes were also checked by an independent oracle. This is a locally verified educational implementation with private source. The available measurements do not establish that ten workers are generally faster than five, and they are not a research result or a parallel-hardware performance claim.
From the model to replayable execution
The diagrams are original, text-free technical drawings explained by the localized captions. The interface captures come from real Java runs on a synthetic puzzle; they are not evidence from the historical submission.

