Package aima.core.logic.propositional.algorithms

Examples of aima.core.logic.propositional.algorithms.WalkSAT


    System.out.println("( (A AND P) => L)");
    System.out.println("((A AND B) => L)");
    System.out.println("(A)");
    System.out.println("(B)");

    WalkSAT walkSAT = new WalkSAT();
    Model m = walkSAT.findModelFor(kb.asSentence().toString(), 1000, 0.5);
    if (m == null) {
      System.out.println("failure");
    } else {
      m.print();
    }
View Full Code Here


public class WalkSATTest {

  // NOT REALLY A JUNIT TESTCASE BUT written as one to allow easy execution
  @Test
  public void testWalkSat() {
    WalkSAT walkSAT = new WalkSAT();
    Model m = walkSAT.findModelFor("( A AND B )", 1000, 0.5);
    if (m == null) {
      System.out.println("failure");
    } else {
      m.print();
    }
View Full Code Here

    }
  }

  @Test
  public void testWalkSat2() {
    WalkSAT walkSAT = new WalkSAT();
    Model m = walkSAT.findModelFor("( A AND (NOT B) )", 1000, 0.5);
    if (m == null) {
      System.out.println("failure");
    } else {
      m.print();
    }
View Full Code Here

    kb.tell("((B AND L) => M)");
    kb.tell("( (A AND P) => L)");
    kb.tell("((A AND B) => L)");
    kb.tell("(A)");
    kb.tell("(B)");
    WalkSAT walkSAT = new WalkSAT();
    Model m = walkSAT.findModelFor(kb.asSentence().toString(), 1000, 0.5);
    if (m == null) {
      System.out.println("failure");
    } else {
      m.print();
    }
View Full Code Here

TOP

Related Classes of aima.core.logic.propositional.algorithms.WalkSAT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.