Algorithm::QLearning - Reinforcement Learning done in Pure Perl
Algorithm::QLearning is a base class for implementations of Q-Learning based algorithms written in Pure Perl, have a look at Algorithm::QLearning::NFQ for a Neural Network implementation.
Defaults to 0.5
, it's the discount factor of the Q-Learning function.
Defaults to 1
, it's the learning rate of the Q-Learning function.
Defaults to 0.1
, it's the probability to choose a random path
List of actions of the system (needed if your environment doesn't send the best possible volue for the agent, this enables the automatic search of the best possible value for the next state)
[1,2,3,4]
Returns the qvalue of the Q-Learning function.
Takes as input: current status, current action, environment result status, environment reward, [best_possible value for next state, optional]
Return the new picked action, based on the epsilon specified, and the given actions
Represent the best possible value, it's internal
Copyright (C) mudler.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
mudler mudler@dark-lab.net