Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Q-learning and SARSA agents #306

Merged
merged 6 commits into from
Jun 19, 2023
Merged

Conversation

riiswa
Copy link
Collaborator

@riiswa riiswa commented Apr 24, 2023

Description

This PR add 2 tabular agents: Q-Learning and SARSA (continuity of #254).

TODO

Add 1 example for qlearning and 1 for sarsa. (video plot)

@KohlerHECTOR
Copy link
Collaborator

Hello it looks good to me, do we usually use the typing library ?

@riiswa
Copy link
Collaborator Author

riiswa commented Apr 24, 2023

Hello it looks good to me, do we usually use the typing library ?

Yes (see #293)

Copy link
Collaborator

@TimotheeMathieu TimotheeMathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I did not check the code carefully but it seems ok.
The docstrings are nice, maybe you can add a "attributes" section (with self.Q typically to say where to go search for Q function) and an examples section (those are optional for now in rlberry but it is nice to have them for QL and SARSA because these are basic algo). See numpy docsting for more info on how to style these sections.

Otherwise, you should also add the two agents in api.rst for them to appear in the documentation, add the change to the changelog in changelog.rst and add the agents to the regular tests in test_agent.py and yes as you pointed out examples would be nice :)

Thanks!

@TimotheeMathieu TimotheeMathieu requested review from KohlerHECTOR and removed request for mmcenta May 10, 2023 08:51
@riiswa
Copy link
Collaborator Author

riiswa commented Jun 19, 2023

Done, sorry for the delay @TimotheeMathieu :)

@TimotheeMathieu TimotheeMathieu merged commit 57cdbe1 into rlberry-py:main Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants