Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supplement functions in ReservoirTrajectory and BehaviorCloningPolicy #390

Merged

Conversation

peterchen96
Copy link
Member

@peterchen96 peterchen96 commented Jul 20, 2021

add update! and prob functions in ReservoirTrajectory and BehaviorCloningPolicy for solving problems mentioned in #386:

  • use reservoir_trajetory to collect data for sl_agent
  • replace average_learner with BehaviourCloningPolicy

So that I can define sl_agent as the following:

sl_agent = Agent(
    policy = BehaviorCloningPolicy(;
        approximator = NeuralNetworkApproximator(
            model = base_model |> _device,
            optimizer = Optimizer(sl_learning_rate),
        ),
        explorer = WeightedSoftmaxExplorer(),
        batch_size = batch_size,
        min_reservoir_history = min_buffer_size_to_learn,
        rng = rng,
    ),
    trajectory = ReservoirTrajectory(
        reservoir_buffer_capacity;
        :state => Vector{Int64},
        :action => Int
    ),
)

@findmyway findmyway merged commit 97f603f into JuliaReinforcementLearning:master Jul 22, 2021
@peterchen96 peterchen96 deleted the peter/supplement branch August 8, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants