Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
RL4J - VideoRecorder #8106
What changes were proposed in this pull request?
Currently in RL4J, the HistoryProcessor can be configured to capture a video of the input. On the conceptual side, a 'HistoryProcessor' shouldn't be responsible of handling the video creation. Also, when we'll start using the DataSet for observations, the HistoryProcessor will receive observations that are transformed to be used by the Learning classes instead of the raw observations of the game.
In this PR, I isolated the video recording code in a simple class, the VideoRecorder.
How was this patch tested?
Manual Tests. Can it be unit tested?
The following checklist helps ensure your PR is complete:
That's the thing; video recording doesn't have a place anymore since I'll be removing/deprecating it from the HistoryProcessor. It should go somewhere in the MDP, but the MDP is only an interface in RL4J; it's up to the user to implement it.
I agree, it does not belong to the environment. But, remember that the learning classes will receive a DataSet with all the transforms already applied, and that's what the DataManager has access to. Plus, I don't like the fact that the DataManager tries to do a lot of things.
What I had in mind is that something will have to handle the observations given by the MDP (a byte array) and convert it to a DataSet. As you know, that byte array can represent anything like a video feed or the positions of pieces on a gaming board. I'm not 100% sure how to do that elegantly. It's easy if what you have is a single video feed or a 1D signal, but I'd like RL4J to be able to easily support advanced cases such as multiple video, audio or sensor feeds all at once. Anyways, for now, what I had in mind is introduce a handler (interface) between the MDP and Learning do the conversion and implement a video handler that can also records the video.
What do you think?
I'll be away for a few days but I'll work on this when I return.