As the question states I am looking for a good explanation/example for reinforcement learning in pybrain as the documentation on this confuses me no end, I can get it to work but I don't understand how to apply it to other things.
Thanks Tom
As the question states I am looking for a good explanation/example for reinforcement learning in pybrain as the documentation on this confuses me no end, I can get it to work but I don't understand how to apply it to other things.
Thanks Tom
Unfortunately, pybrain's documentation for rl classes is disappointing. I have found this blog quite useful.
In summary, you need to identify the following components (for the implementation details follow the tutorial on the link):
env = Environment(...)
task = Task(env)
controller = Module(...)
learner = SARSA()
--> you may also add an Explorer to the learner. The default is epsilon-greedy with epsilon = 0.3, decay = 0.9999.agent = Agent(controller, learner)
experiment = Experiment(task, agent)
Each of the capitalized classes should be replaced with corresponding class from PyBrain.Then you simply run a do-while cycle to perform the iterations and learn. Note that there are several options to be set by the user, and in real-world problems you most likely need to write sub-classes to generalize the basic classes of pybrain, but the steps will be the same as here.