sharpie.webserver.experiment.policy_template

Template for a Policy implementation.

This is a basic template showing the expected structure for a policy file. Your policy should define a variable called policy with methods for action selection.

Classes

Policy()

A basic policy template.

class sharpie.webserver.experiment.policy_template.Policy

A basic policy template.

__init__()

Initialize the policy.

predict(observation)

Predict an action based on the observation.

Args:

observation: Current observation from the environment

Returns:

action: The action to take

update(observation, action, reward, next_observation)

Update the policy based on experience.

Args:

observation: Previous observation action: Action taken reward: Reward received next_observation: Next observation