Package stanfordlogic.knowledge

Examples of stanfordlogic.knowledge.MetaGdl


        GdlAtom roleAtom = (GdlAtom) content.getElement(2);
        TermObject role_term = (TermObject) TermObject.buildFromGdl(roleAtom);
        my_role = role_term.toString();
       
        GdlList game_description = (GdlList) content.getElement(3);
        GameInformation gameInfo = new MetaGdl(GameManager.getParser()).examineGdl(game_description);
        all_roles = new ArrayList<String>();
        for(TermObject t : gameInfo.getRoles())
        {
            all_roles.add(t.toString());
        }  
View Full Code Here


    {
        Parser parser = GameManager.getParser();
       
        Gamer gamer = makeGamer(gameId, parser);
       
        GameInformation gameInfo = new MetaGdl(parser).examineGdl(description);
       
        KnowledgeBase staticKb = new BasicKB();
        staticKb.loadWithFacts(gameInfo.getAllGrounds());
       
        AbstractReasoner reasoner = new BasicReasoner(staticKb, gameInfo.getIndexedRules(), parser);
View Full Code Here

    {
        Parser parser = GameManager.getParser();
       
        Gamer gamer = new RandomGamer(gameId, parser);
       
        GameInformation gameInfo = new MetaGdl(parser).examineGdl(description);
       
        KnowledgeBase staticKb = new BasicKB();
        staticKb.loadWithFacts(gameInfo.getAllGrounds());
       
        AbstractReasoner reasoner = new BasicReasoner(staticKb, gameInfo.getIndexedRules(), parser);
View Full Code Here

  private GdlList rules;

  public Reasoner(String gameDescription, Parser parser){
    this.parser=parser;
    rules=parser.parse(gameDescription);
        GameInformation gameInfo = new MetaGdl(parser).examineGdl(rules);
        KnowledgeBase staticKb = new BasicKB();
        staticKb.loadWithFacts(gameInfo.getAllGrounds());
        this.stanfordlogicReasoner = new BasicReasoner(staticKb, gameInfo.getIndexedRules(), parser);
    queryTerminal=makeQuery("terminal");
    queryNext=makeQuery("next", "?f");
View Full Code Here

    public static GameInformation createGameInfo(String filename) throws IOException
    {
        Game<Term, GameState> game = new Game<Term, GameState>(new File(filename), new ReasonerFactory(), GDLVersion.v1);
        String game_desc = "("+game.getKIFGameDescription()+")";
        GdlList list = (GdlList)GameManager.getParser().parse(game_desc).getElement(0);
        return new MetaGdl(GameManager.getParser()).examineGdl(list);
    }
View Full Code Here

        this((GdlList)GameManager.getParser().parse(game_desc).getElement(0));
    }
   
    public GameReasoner(GdlList game_description)
    {
        this(new MetaGdl(GameManager.getParser()).examineGdl(game_description));
    }
View Full Code Here

    public String env_init()
    {
        GdlAtom roleAtom = (GdlAtom) start_content.getElement(2);
        role = (TermObject) TermObject.buildFromGdl(roleAtom);
        GdlList game_description = (GdlList) start_content.getElement(3);
        GameInformation gameInfo = new MetaGdl(GameManager.getParser()).examineGdl(game_description);
        roles = gameInfo.getRoles();
        reasoner = new GameReasoner(gameInfo);
        state = new GDLState(reasoner);
       
        return start_content.toString();
View Full Code Here

    {
        Parser parser = GameManager.getParser();
       
        Gamer gamer = new LegalGamer(gameId, parser);
       
        GameInformation gameInfo = new MetaGdl(parser).examineGdl(description);
       
        KnowledgeBase staticKb = new BasicKB();
        staticKb.loadWithFacts(gameInfo.getAllGrounds());
       
        AbstractReasoner reasoner = new BasicReasoner(staticKb, gameInfo.getIndexedRules(), parser);
View Full Code Here

TOP

Related Classes of stanfordlogic.knowledge.MetaGdl

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.