📄 sarsaagentrt.txt
字号:
class SarsaAgentRT
Class that implements an RL learning agent using SARSA(lambda) learning algorithm with replacing eligibility traces. The implementation is based on the proposed standard C++ interface classes. This class implements abstract class Agent.
Synopsys: #include "sarsart_agent.h"
Link: agent.cpp
sarsart_agent.cpp
environment.cpp
random_numbers.cpp
sarepr.cpp
safa.cpp
Public methods:
SarsaAgentRT(double g, const ActionSet& a_s, StateActionFA* const f, Environment * const e)
General constructor. Parameters:
g : Discount facor.
a_s : Set of available actions.
f : Pointer to approximation architectures that represent action value functions (one architecture for each action).
e : Pointer to the Environment object with which the agent will interact.
setLearningParameters(int argc, char *argv[])
Implements the corresponding virtual function of the base Agent class. Sets parameters of the SARSA(lambda) learning algorithm. Parameters are supplied in a command-line argument manner, where argc is the number of parameters in argv array. Each string in argv array is one parameter and its value. Acceptable parameters and their format (to be passed in argv):
lambda=value : Value of the lambda parameter from [0,1];
epsilon=value : Value of the epsilon parameter (in [0,1]) for epsilon-greedy exploration strategy.
These parameters may be specified as command-line arguments to main(int argc, char *argv[]) and then passed directly to this function.
static void helpLearningParameters()
Print out the format for command-line specification of the learning parameters.
Usage: SarsaAgentRT::helpLearningParameters();
Non-virtual functions of the base Agent class :
initTrial
getRetrun
getBellmanError
setArchitectureParameters
saveArchitectureParameters
~SarsaAgentRT()
Destructor.
--------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -