Solve a constraint problem with Prolog search

8 steps · about 3 h 50 min · Intermediate

  1. Run first Prolog queries (guide, SWI-Prolog manual, 20 min)

    This establishes the concepts the later implementation relies on.

  2. Read terms and clauses accurately (guide, SWI-Prolog manual, 30 min)

    This adds the next capability while keeping the design explicit.

  3. Control conjunction and alternatives (guide, SWI-Prolog manual, 40 min)

    This step turns the concept into a checkable part of the finished program.

  4. Understand goals as data (guide, SWI-Prolog manual, 20 min)

    This establishes the concepts the later implementation relies on.

  5. Trace a search (guide, SWI-Prolog manual, 30 min)

    This adds the next capability while keeping the design explicit.

  6. State finite-domain constraints (guide, SWI-Prolog manual, 40 min)

    This step turns the concept into a checkable part of the finished program.

  7. Reuse recursive results (guide, SWI-Prolog manual, 20 min)

    This establishes the concepts the later implementation relies on.

  8. Turn examples into tests (reference, SWI-Prolog manual, 30 min)

    This adds the next capability while keeping the design explicit.