Class RandomSearchSatSolver

java.lang.Object
  extended by RandomSearchSatSolver
All Implemented Interfaces:
SatSolver

public class RandomSearchSatSolver
extends java.lang.Object
implements SatSolver

This is a trivial implementation of SatSolver that simply generates random models and returns the best one when time runs out. You can use this class as a sample when writing your own.


Constructor Summary
RandomSearchSatSolver()
          A constructor for this class.
 
Method Summary
 java.lang.String author()
          The author of this sat-solver.
 java.lang.String description()
          A brief description of this sat-solver.
 boolean[] solve(Literal[][] cnf, Timer timer)
          This routine attempts to solve the satisfaction problem by trying random models until time runs out and returning the best one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSearchSatSolver

public RandomSearchSatSolver()
A constructor for this class.

Method Detail

solve

public boolean[] solve(Literal[][] cnf,
                       Timer timer)
This routine attempts to solve the satisfaction problem by trying random models until time runs out and returning the best one.

Specified by:
solve in interface SatSolver

author

public java.lang.String author()
The author of this sat-solver.

Specified by:
author in interface SatSolver

description

public java.lang.String description()
A brief description of this sat-solver.

Specified by:
description in interface SatSolver