Package edu.uky.ai.csp

# Class Solver

java.lang.Object
edu.uky.ai.csp.Solver

    public class Solver
    extends java.lang.Object

Provides the constraint propagation and search algorithms used to solve constraint satisfaction problems.

Author:
  Your Name

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `Solver()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static boolean` | `propagate​(Solution solution)` | Given a partial solution, this method propagates the constraints of a problem to achieve 2-consistency.
  `static Solution` | `solve​(Solution solution)` | Solves a constraint satisfaction problem via backtracking search.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Solver

    public Solver()

- ## Method Details

  - ### propagate

    public static boolean propagate​(Solution solution)

    Given a partial solution, this method propagates the constraints of a problem to achieve 2-consistency.

    This method should call `propagate(Solution, Queue)` to do the actual work. This method simply sets up the initial queue of constraints (which is all of the problem's binary constraints).

    Parameters:
      `solution` - a partial solution whose variable domains should be modified
    Returns:
      false if the problem is found to be unsolvable, true otherwise

  - ### solve

    public static Solution solve​(Solution solution)
    Solves a constraint satisfaction problem via backtracking search.
    Parameters:
      `solution` - a partial solution to refine
    Returns:
      a complete solution, or null if the problem cannot be solved