Package org.ggp.base.util.prover.aima.renamer

Examples of org.ggp.base.util.prover.aima.renamer.VariableRenamer


    goals.add(query);

    Set<Substitution> answers = new HashSet<Substitution>();
    Set<GdlSentence> alreadyAsking = new HashSet<GdlSentence>();
    ask(goals, new KnowledgeBase(context), new Substitution(), ProverCache.createSingleThreadedCache(),
        new VariableRenamer(), askOne, answers, alreadyAsking);

    Set<GdlSentence> results = new HashSet<GdlSentence>();
    for (Substitution theta : answers)
    {
      results.add(Substituter.substitute(query, theta));
View Full Code Here


  }

  // Returns true iff the result is constant across all possible states of the game.
  private boolean askSentence(GdlSentence sentence, LinkedList<GdlLiteral> goals, KnowledgeBase context, Substitution theta, ProverCache cache, VariableRenamer renamer, boolean askOne, Set<Substitution> results, Set<GdlSentence> alreadyAsking)
  {
    GdlSentence varRenamedSentence = new VariableRenamer().rename(sentence);
    if (!fixedAnswerCache.contains(varRenamedSentence) && !cache.contains(varRenamedSentence))
    {
      //Prevent infinite loops on certain recursive queries.
      if(alreadyAsking.contains(sentence)) {
        return false;
View Full Code Here

TOP

Related Classes of org.ggp.base.util.prover.aima.renamer.VariableRenamer

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.