kakaoenterprise / JORLDY

Repository for Open Source Reinforcement Learning Framework JORLDY
Apache License 2.0
359 stars 50 forks source link

pre-check discrete or continuous action by algorithms #41

Closed HanbumKo closed 2 years ago

HanbumKo commented 2 years ago

Is your feature request related to a problem? Please describe. Hi, thank you for sharing this project. For now it seems DQN doesn't check discrete or continuous in advance. When I change dqn.cartpole config

env = {
    "name":"cartpole",
    "render":False,
}

to

env = {
    "name":"cartpole",
    "render":False,
    "mode":"continuous",
}

it doesn't give any errors and isn't trained well. Since DQN is an algorithm for discrete action and buffer gives integer actions so continuous Cartpole env only run action = 1. (and I didn't really look into that other algorithms check the actions, but DQN doesn't)

Describe the solution you'd like It might be possible to insert assert statement in each algorithm codes.

Describe alternatives you've considered x

Additional context x

ramanuzan commented 2 years ago

Thank you for contributing our project. fixed issue. #60