currently I'm stuck at is how to build the initial tree {i've never built or used search trees before so this is new to me. }
this is how i see it working:
build a list of all viable non solved cells, from a grid
cell[0-80]
for each of these cells
we have: Digits [1-9]
which are found in 1 of three sector options:
Sector: Row,Col,Box [27
which can contain
Peer digit cells of the selected cell and digit as:
Strong link:
bivalve cell
only 2 positions for R,C,B {naked}
only 2 R,C,B position in Sector {hidden}
=>>
save Cell position
Empty Rectangle intersection:
all the cells of Box Sector are found only on an intersecting Mini Row & Mini Col within a box,
where Mini Row or Mini Col do not hold all cells with in box sector.
=>>
Save intersection [miniRow * MiniCol ] cell.
note: not sure if there is a "hidden" version of an ERI as I've never considered that option before
Weak-Link:
starting cell see all except 1 cell in a R,C,B {naked}
Starting cell see's all except 1 R,C,B position in Sector {hidden}
=>> Save intersection of starting Cells sector and sector of weak link
{gives a grouped node on, row,col,box}
which generates:
cells[0..80]
digits [1..9]
Sector(Row,Col,Box) [0..2]
Link( Strong, Weak, ERI) [0..2]
for each Link cell saved we create a child that searches and saves identical as the above , {noting that it cannot reuse already saved data points on that tree branch}
start:
digit 1
Col
sector 2
Link cell 9
makes a new tree {showing how cell 9 is linked to other digits}
is this correct?