Examples of Observation


Examples of org.rlcommunity.rlglue.codec.types.Observation

                //Query the value function in the agent
                double positionVal = dataProvider.getMinValueForDim(0) + x * xQueryIncrement;
                double velocityVal = dataProvider.getMinValueForDim(1) + y * yQueryIncrement;

                Observation thisState = new Observation(0, 2);
                thisState.doubleArray[0] = positionVal;
                thisState.doubleArray[1] = velocityVal;
                thePoints.add(thisState);
            }
        }
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        network.putInt(Network.sizeOf(taskSpec)); // This is different than taskSpec.length(). It also includes
        network.putString(taskSpec);
    }

    protected void onEnvStart() {
        Observation obs = env.env_start();

        network.clearSendBuffer();
        network.putInt(Network.kEnvStart);
        network.putInt(Network.sizeOf(obs));
        network.putObservation(obs);
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

    protected void onAgentStart() {
        if (debug) {
            System.out.println("\tonAgentStart()");
        }
        Observation observation = network.getObservation();
        if (debug) {
            System.out.println("\t\tgot observation");
        }
        Action action = agent.agent_start(observation);
        if (debug) {
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        network.putAction(action);
    }

    protected void onAgentStep() {
        double reward = network.getDouble();
        Observation observation = network.getObservation();
        Action action = agent.agent_step(reward, observation);

        int size = Network.sizeOf(action);
        network.clearSendBuffer();
        network.putInt(Network.kAgentStep);
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        checkInstance();
        if (!inited) {
            System.err.println("-- Warning From RLGlue :: RL_env_start() was called without RL_init().");
        }
        currentEpisodeOver = false;
        Observation returnObs = instance.RL_env_start();
        if (returnObs == null) {
            System.err.println("-- Warning From RLGlue :: RL_env_start() response was NULL, that should be impossible.");
            returnObs = new Observation();
        }
        return returnObs;
    }
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        return returnString;

    }

    public Observation getObservation() {
        Observation returnVal = new Observation();
        fillAbstractType(returnVal);
        return returnVal;
    }
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        numSteps = 0;
        return taskSpec;
    }

    public synchronized Observation_action RL_start() {
        Observation o = RL_env_start();
        lastAction = RL_agent_start(o);
        Observation_action ao = new Observation_action(o, lastAction);
        return ao;
    }
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

    public synchronized Observation RL_env_start() {
        numSteps = 1;
        isTerminal = false;
        totalReward = 0.0d;

        Observation o = E.env_start();
        if (o == null) {
            System.err.println("o came back as null from RL_start");
        }
        return o;
    }
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        obsact.a = network.getAction();
        return obsact;
    }
    public synchronized Observation RL_env_start() {
        sendEmpty(Network.kRLEnvStart, "RL_env_start");
        Observation obs = new Observation();

        obs = network.getObservation();
        return obs;
    }
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.