backtrex v0.1.1 Backtrex behaviour
A backtracking behaviour for solving discrete computational problems.
Summary
Types
Potential value
assignment for some unknown
An assignment
with a list of value
s left to try
Next value to try
A puzzle with a set of unknown
s, possible assignment
s
for each, and an invariant property
Unique identifier for an unknown in a problem
Value that could be assigned to an unknown
Types
An assignment
with a list of value
s left to try.
Next value to try.
A puzzle with a set of unknown
s, possible assignment
s
for each, and an invariant property.
Each type of problem
must have ways to:
- enumerate its unknowns (see
c:unknowns
), - enumerate
value
s that could be assigned to any particularunknown
in a solution (seec:values
). - incorporate proposed
assignments
(seec:with_assignments
), and - check whether the invariant holds (see
c:valid?
).