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

feature(xrk): add new env named Flozen Lake and DQN algorithm. #779

Closed
wants to merge 7 commits into from

Conversation

rongkunxue
Copy link
Contributor

Description

Add adaptation to gymnasium environment and give examples based on DQN algorithm

Related Issue

TODO

Need to be compatible with the latest pipeline

Check List

  • merge the latest version source branch/repo, and resolve all the conflicts
  • pass style check
  • pass all the tests

@PaParaZz1 PaParaZz1 added the env Questions about RL environment label Mar 11, 2024

policy = dict(
cuda=True,
load_path='cartpole_dqn_seed0/ckpt/ckpt_best.pth.tar',
Copy link
Member

Choose a reason for hiding this comment

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

remove unused fields or update its values

end=0.1,
decay=10000,
),
replay_buffer=dict(replay_buffer_size=128, ),
Copy link
Member

Choose a reason for hiding this comment

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

why use such a small buffer


@ENV_REGISTRY.register('frozen_lake')
class FrozenLakeEnv(BaseEnv):
@classmethod
Copy link
Member

Choose a reason for hiding this comment

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

why comment this method


@staticmethod
def frames_to_gif(self,frames, gif_path, duration=0.1):
"""
Copy link
Member

Choose a reason for hiding this comment

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

add English comments and Python typing lint

env.seed(314,dynamic_seed=False)
assert env._seed == 314
obs = env.reset()
print(obs)
Copy link
Member

Choose a reason for hiding this comment

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

add some assertions about the results of env.step

@rongkunxue rongkunxue closed this Mar 12, 2024
@rongkunxue rongkunxue deleted the frozen_lake_env branch March 12, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env Questions about RL environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants