puzzle-solver-patterns

Document constraint-satisfaction patterns for the Pips puzzle solver.

1|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/tfunk1030/vibe --skill puzzle-solver-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: puzzle-solver-patterns
Source: https://github.com/tfunk1030/vibe/tree/main/.claude/skills/puzzle-solver-patterns
Command: npx skills add https://github.com/tfunk1030/vibe --skill puzzle-solver-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Puzzle Solver Patterns guide provides patterns and best practices for working with the constraint satisfaction solver used in the Pips puzzle app, helping developers extend and debug the solver.

Core Features & Use Cases

  • Understand common constraint types (sum, equal, different, greater, less, any) and how to combine them with MRV-based backtracking.
  • Learn how to add new constraints (e.g., product, sequential) and perform full and partial constraint checks.
  • Debug solver failures with structured tests, see references to solver.ts and puzzle.ts, and validate with real puzzle scenarios like L-shaped layouts.

Quick Start

Open the Puzzle Solver Patterns guide and follow the examples to add a new constraint type to the solver, then test it with the provided L-shaped puzzle.

Frequently Asked Questions about puzzle-solver-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new constraint type to a constraint satisfaction puzzle solver?

Constraint satisfaction solver failures can be debugged using structured tests and validating with real puzzle scenarios like L-shaped layouts. The patterns guide references solver.ts and puzzle.ts to help trace unsatisfiable puzzles and verify constraint logic.

What is MRV-based backtracking and how does it work with puzzle constraints?

MRV-based backtracking is a search strategy that selects the variable with the Minimum Remaining Values to reduce branching. It works with common constraint types like sum, equal, different, greater, less, and any to efficiently prune invalid puzzle states.

How do I implement partial pruning checks for a puzzle solver?

Partial pruning checks are implemented by evaluating constraint satisfaction before a puzzle state is fully assigned. This guide details performing full and partial constraint checks alongside type definitions and algorithmic checks within solver.ts components.

Can I use these constraint patterns to debug unsatisfiable puzzle layouts?

Yes, you can use these constraint patterns to debug unsatisfiable puzzle layouts by applying structured testing workflows. The guide demonstrates validating solver failures using real puzzle scenarios like L-shaped layouts across puzzle.ts and related components.

What are the limitations when tuning MRV backtracking for complex puzzle constraints?

When tuning MRV backtracking, limitations arise from unsatisfiable puzzle states and incomplete partial pruning. This guide addresses these constraints by providing best practices for type definitions, algorithmic checks, and structured testing workflows to ensure robust solving.