Package aima.core.logic.fol.kb

Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.tell()


    Sentence classification = parser.parse("will_wait(X0)");

    FOLKnowledgeBase kb = new FOLKnowledgeBase(domain,
        new FOLOTTERLikeTheoremProver(false));

    kb.tell(hypothesis);
    kb.tell(desc);

    InferenceResult ir = kb.ask(classification);

    Assert.assertFalse(ir.isTrue());
View Full Code Here


    FOLKnowledgeBase kb = new FOLKnowledgeBase(domain,
        new FOLOTTERLikeTheoremProver(false));

    kb.tell(hypothesis);
    kb.tell(desc);

    InferenceResult ir = kb.ask(classification);

    Assert.assertFalse(ir.isTrue());
    Assert.assertTrue(ir.isPossiblyFalse());
View Full Code Here

    // new clauses will always be created (i.e. is an
    // infinite universe of discourse).
    FOLKnowledgeBase kb = new FOLKnowledgeBase(
        DomainFactory.lovesAnimalDomain());

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");
View Full Code Here

    // infinite universe of discourse).
    FOLKnowledgeBase kb = new FOLKnowledgeBase(
        DomainFactory.lovesAnimalDomain());

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");
View Full Code Here

    FOLKnowledgeBase kb = new FOLKnowledgeBase(
        DomainFactory.lovesAnimalDomain());

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");

    Set<Clause> clauses = new LinkedHashSet<Clause>();
View Full Code Here

        DomainFactory.lovesAnimalDomain());

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");

    Set<Clause> clauses = new LinkedHashSet<Clause>();
    clauses.addAll(kb.getAllClauses());
View Full Code Here

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");

    Set<Clause> clauses = new LinkedHashSet<Clause>();
    clauses.addAll(kb.getAllClauses());
View Full Code Here

    kb.tell("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");
    kb.tell("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");
    kb.tell("FORALL x (Animal(x) => Loves(Jack, x))");
    kb.tell("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");
    kb.tell("Cat(Tuna)");
    kb.tell("FORALL x (Cat(x) => Animal(x))");

    Set<Clause> clauses = new LinkedHashSet<Clause>();
    clauses.addAll(kb.getAllClauses());

    Set<Clause> newClauses = new LinkedHashSet<Clause>();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.