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.

Generated conceptual cover for overlapping Samurai grids and worker coordination; not a run capture or performance result
Generated conceptual illustration, not a product screen or research result.

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

  1. The application reads the board and rejects malformed dimensions, symbols or contradictory givens.
  2. It builds a membership map connecting each physical cell to the one or two grids it belongs to.
  3. Every worker receives an independent search state derived from the same input.
  4. 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.
  5. 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.
  6. 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.

Five overlapping Samurai grids form one constraint graph with 369 cells and 36 shared cells
One global boardEach overlap is the same physical set of cells with two memberships; values are not copied into independent grids.
A global board passes a start gate into five-worker and ten-worker lanes, then one winner and one selected worker board
One anchor and independent state per workerFive mode uses one worker per grid; ten mode uses two workers and two anchors per grid. States remain independent, and the display selects one.
Worker events enter one sequenced log, are filtered to one worker, and feed replay and a progress chart
Sequenced log and auditable replayEvents share one order, while replay follows one selected worker instead of mixing conflicting assignments.

Real execution captures

During execution: an intermediate state reconstructed from the immutable real event log.
After solving: winner and terminal states, with every worker joined.
Replay: the selected worker path only, one recorded change at a time.

Help improve this content

Suggest a correction or edit

Your contribution is private and used to review and improve this content. The Privacy Policy explains how data is processed and retained and how to request deletion. Read the Privacy Policy and Terms of Use.