Examples of GDLState


Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

        // Start to explore
        algorithm.load();
       
        if(explore)
        {
            GDLState state = new GDLState(reasoner);
            explore(state,start_clock);
        }
    }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

    public Action agent_start(Observation observation)
    {
        if(explore)
        {
            String obs_str = new String(observation.charArray);
            GDLState state = new GDLState(reasoner, obs_str);
            explore(state,play_clock);
        }
       
        return decide(observation);
    }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

   
    @Override
    public Action agent_step(double reward, Observation observation)
    {
        String obs_str = new String(observation.charArray);
        RState result = new GDLState(reasoner,obs_str);
       
        current_episode.addTransiton(last_state, last_action, result, reward);
       
        if(explore)
        {
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

    }
   
    private Action decide(Observation observation)
    {
        String obs_str = new String(observation.charArray);
        GDLState state = new GDLState(reasoner,obs_str);
        Set<RAction> legalActions = state.legalActions(my_role);
       
        if(legalActions.isEmpty())
        {
            System.out.println("no legal action for me in this state : " + state);
        }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

        for (TermObject t : roles_terms)
        {
            roles.add(t.toString());
        }
       
        GDLState initial_state = new GDLState(reasoner);
       
        fillQTable(table, initial_state, roles, null, null, tracker);
       
        return table;
    }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

            // If a child is not already seen, we do a recursive call on it.
            List<Map<String, RAction>> all_actions = getAllPossibleActions(state,roles);
            tracker.addLayer(all_actions.size());
            for (Map<String, RAction> actions : all_actions)
            {
                GDLState child = (GDLState)state.next(actions.values());
                if (!SerializableState.already_seen(child))
                {
                    fillQTable(table, child, roles, state, actions, tracker);
                }
                tracker.addProgress();
            }
           
            // At this point, the Q table is up to date for all the children
            // So we can estimate the Q value of the current state
            // by using a minimax-like algorithm
            RoleQMap min_q = new RoleQMap(roles);
            for (Map<String, RAction> actions : all_actions)
            {
                GDLState child = (GDLState)state.next(actions.values());
               
                for (String role : roles)
                {
                    // Get the max q from child actions
                    double max_q = getMaxQ(table, child, role);
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

        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

Examples of fr.irit.halterego.rrl_ggp.impl.GDLState

            GameReasoner reasoner = new GameReasoner(game_infos);
           
            for(int i = 0; i < iterations; ++i)
            {
                System.out.println("iteration " + i);
                RState state = new GDLState(reasoner);
                algorithm.exploreNewEpisode(state, agents);
            }
               
            algorithm.save();
        }
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.