josiahls / fast-reinforcement-learning

Important Note fastrl version 2 is being developed at fastrl. Note the link in the readme
Apache License 2.0
38 stars 5 forks source link

AgentInterpretation #3

Closed josiahls closed 4 years ago

josiahls commented 5 years ago

Discussion ClassificationInterpretation is one of the greatest reasons to use the fastai library. I believe that a similar AgentInterpretation class could single handedly turn this repo into a "hey this spaghetti code is actually useful" as opposed to the current "this spaghetti code needs some more meatballs still :( ".

Some of the questions I have is:

Most important

Edit [1]: Added a heatmap rewards function and a rewards plotter. The heatmap rewards function will only work for grid like envs where the state space is 2 dimensional (2D maze / grid). I am thinking about how to extend this since heatmapping rewards can be one of the most effective ways of debugging RL agents. For now, I have a function for testing Discrete agents. I will want to add continuous heatmapping somehow.

josiahls commented 5 years ago

Rerference docs_src/rl.core.mdp_interpreter.ipynb. Can now do reward output, but also single episode interactive gif:

Screen Shot 2019-09-08 at 3 41 52 PM

Allows you to easily investigate a single episode within 2 lines. Will soon convert it to one line, however at the moment the cell doesnt register the player unless the ipython_display is executed in the cell directly.