From 05d72269166a4dbf389c766fc523b039f4212b09 Mon Sep 17 00:00:00 2001 From: Davoud Taghawi-Nejad Date: Sat, 4 Aug 2012 23:39:08 +0200 Subject: [PATCH 1/2] added an explenation how the explorers can be added to Learning Agents --- pybrain/rl/explorers/explorer.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pybrain/rl/explorers/explorer.py b/pybrain/rl/explorers/explorer.py index 1f0f81e60..99f32d97a 100644 --- a/pybrain/rl/explorers/explorer.py +++ b/pybrain/rl/explorers/explorer.py @@ -8,6 +8,16 @@ class Explorer(Module): """ An Explorer object is used in Agents, receives the current state and action (from the controller Module) and returns an explorative action that is executed instead the given action. + + Explorer have to be added to the learner before adding the learner + to the LearningAgent. + + For Example:: + + controller = ActionValueNetwork(2, 100) + learner = SARSA() + learner.explorer = NormalExplorer(1, 0.1) + self.learning_agent = LearningAgent(controller, learner) """ def activate(self, state, action): @@ -20,4 +30,4 @@ def activate(self, state, action): def newEpisode(self): """ Inform the explorer about the start of a new episode. """ - pass \ No newline at end of file + pass From b8c06cf6b7033339f046ca19cc372722bd518a67 Mon Sep 17 00:00:00 2001 From: Davoud Taghawi-Nejad Date: Sun, 5 Aug 2012 09:03:45 +0300 Subject: [PATCH 2/2] Update pybrain/rl/explorers/explorer.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added table of explorers and explanation how to add explorers to a LearningAgent  --- pybrain/rl/explorers/explorer.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pybrain/rl/explorers/explorer.py b/pybrain/rl/explorers/explorer.py index 99f32d97a..b7a78c71a 100644 --- a/pybrain/rl/explorers/explorer.py +++ b/pybrain/rl/explorers/explorer.py @@ -8,8 +8,20 @@ class Explorer(Module): """ An Explorer object is used in Agents, receives the current state and action (from the controller Module) and returns an explorative action that is executed instead the given action. - - Explorer have to be added to the learner before adding the learner + + Continous explorer will produce continous action states, discrete + once discrete actions accordingly. + + Explorer action episodic? + =============================== ========= ========= + NormalExplorer continous no + StateDependentExplorer continous yes + BoltzmannExplorer discrete no + EpsilonGreedyExplorer discrete no + DiscreteStateDependentExplorer discrete yes + + + Explorer has to be added to the learner before adding the learner to the LearningAgent. For Example::