Example #1
0
def analyze():
	exp_params = ExperimentParameters()

	model_output_dir = "../../../models/qlearning/state/%i" % exp_params.seed
	exp_params.model_output_dir = model_output_dir

	image_output_dir = "../../../images/qlearning/state/%i" % exp_params.seed
	exp_params.image_output_dir = image_output_dir

	analyze_models(exp_params)
Example #2
0
File: sarsa.py Project: raholm/DMP
def analyze():
    exp_params = ExperimentParameters()

    model_output_dir = "../../../models/sarsa/reward/%i" % exp_params.seed
    exp_params.model_output_dir = model_output_dir

    image_output_dir = "../../../images/sarsa/reward/%i" % exp_params.seed
    exp_params.image_output_dir = image_output_dir

    analyze_models(exp_params)
Example #3
0
def analyze():
    exp_params = ExperimentParameters()
    exp_params.seed = get_reward_seeds()[2]

    model_output_dir = "../../../models/qlearning/reward/%i" % exp_params.seed
    exp_params.model_output_dir = model_output_dir

    image_output_dir = "../../../images/qlearning/reward/%i" % exp_params.seed
    exp_params.image_output_dir = image_output_dir

    analyze_models(exp_params)
Example #4
0
def analyze():
	exp_params = ExperimentParameters()
	exp_params.seed = get_parameters_seed()

	model_output_dir = "../../../models/expected_sarsa/params/%i" % exp_params.seed
	exp_params.model_output_dir = model_output_dir

	image_output_dir = "../../../images/expected_sarsa/params/%i" % exp_params.seed
	exp_params.image_output_dir = image_output_dir

	analyze_models(exp_params)
Example #5
0
File: sarsa.py Project: raholm/DMP
def train():
    for params in get_snake_parameters():
        env = SnakeEnvironment(params)
        params.policy = EpsilonGreedyPolicy(env, params.epsilon)

        exp_params = ExperimentParameters()
        exp_params.env = env
        exp_params.model_class = Sarsa
        exp_params.model_params = params
        exp_params.seed = get_parameters_seed()

        output_dir = "../../../models/sarsa/params/%i" % exp_params.seed
        exp_params.model_output_dir = output_dir

        train_and_store_model(exp_params)
Example #6
0
File: sarsa.py Project: raholm/DMP
def analyze_test():
    params = SnakeParameters()
    params.discount_factor = StaticDiscountFactor(0.95)
    params.learning_rate = StaticLearningRate(0.15)

    env = SnakeEnvironment(params)
    params.policy = GreedyPolicy(env)

    exp_params = ExperimentParameters()
    exp_params.env = env
    exp_params.model_class = Sarsa
    exp_params.model_params = params

    model_output_dir = "../../../models/sarsa/reward/%i" % exp_params.seed
    exp_params.model_output_dir = model_output_dir

    image_output_dir = "../../../images/sarsa/reward/%i" % exp_params.seed
    exp_params.image_output_dir = image_output_dir

    analyze_models_test(exp_params)
Example #7
0
File: sarsa.py Project: raholm/DMP
def train():
    params = SnakeParameters()
    params.discount_factor = StaticDiscountFactor(0.95)
    params.learning_rate = StaticLearningRate(0.15)
    params.reward = get_state_reward()

    env = SnakeEnvironment(params)
    params.policy = EpsilonGreedyPolicy(env, params.epsilon)

    exp_params = ExperimentParameters()
    exp_params.env = env
    exp_params.model_class = Sarsa
    exp_params.model_params = params

    for seed in get_state_seeds():
        exp_params.seed = seed

        output_dir = "../../../models/sarsa/state/%i" % exp_params.seed
        exp_params.model_output_dir = output_dir

        train_models(exp_params)
Example #8
0
def train():
    params = SnakeParameters()
    params.discount_factor = StaticDiscountFactor(0.85)
    params.learning_rate = StaticLearningRate(0.85)

    env = SnakeEnvironment(params)
    params.policy = EpsilonGreedyPolicy(env, params.epsilon)

    exp_params = ExperimentParameters()
    exp_params.env = env
    exp_params.model_class = QLearning
    exp_params.model_params = params

    for seed in get_reward_seeds():
        exp_params.seed = seed

        output_dir = "../../../models/qlearning/reward/%i" % exp_params.seed
        exp_params.model_output_dir = output_dir

        for state in get_reward_states():
            exp_params.model_params.state = state
            train_models(exp_params)