Skip to content

Make the construction of QLearningAgents easier #72

Description

@sofian

It is currently quite cumbersome to create a QLearningAgent (and also to free its memory). Quick example of creation code:

  policy           = Q_NEW(QLearningEGreedyPolicy)(EPSILON);
  actionProperties = Q_NEW(ActionProperties)(DIM_ACTION, N_ACTIONS);
  nn               = Q_NEW(NeuralNetwork)(DIM_OBSERVATION+DIM_ACTION, N_HIDDEN, 1, LEARNING_RATE, DECREASE_CONSTANT, WEIGHT_DECAY, true);
  qFunc            = Q_NEW(QFunction)(nn, DIM_OBSERVATION, actionProperties);
  agent            = Q_NEW(QLearningAgent)(qFunc, policy, DIM_OBSERVATION, actionProperties, LAMBDA, GAMMA);

We could at the very implement a set of utilities to automatically generate the neural network with appropriate dimensions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions