-
openAI gym 환경 생성 알아보기 (2)python source code 2023. 7. 22. 19:57728x90
Custom으로 env를 (environment) 생성시 action, observation space를
gym에서 제공하는 메소드를 통하여 생성할 수 있다.
직접 custom env를 생성하고 신경망, agent를 만들어 사용하는 경우에
어떻게 해야 discrete, multidiscrete 등의 메소드를 매 step() 함수마다 적용할 수 있는지 많은 고심을 했지만
그냥 빠르게 포기하는게 낫다는 판단을 해버렸다.
모듈화된 Agent를 사용하는 것이 아니라면 말이다....
아래 답변과 같이 참고할만한 링크를 맨 아래에 적어두었다.
나만의 agent를 만들고 openAI에서 제공하는 rl을 사용할 것이 아니라면 맘편히 직접 만들어보자!
더보기stable-baselines 3 does not support action spaces different from Dicrete / MultiDiscrete / Box and there is absolutely no need in custom action spaces, because your action(s) is (are) fully determined by an output of your neural network being consequently either a natural/real number or a vector of them, so that three above mentioned classes fully cover them
https://stackoverflow.com/questions/72751902/how-to-train-an-rl-agent-in-a-custom-environment
How to train an RL agent in a custom environment?
I have created a custom space, which extends the OpenAI gym.Space. I need this space because I need an action space that sums up to a value. Using this, I can scale up the output and meet my requir...
stackoverflow.com
반응형'python source code' 카테고리의 다른 글
python numpy multi dimension random choice 에러 해결 (0) 2023.08.04 np zeros 타입에러 'cannot interpret '2' as a data type' (0) 2023.07.30 openAI gym 환경 생성 알아보기 (1) (0) 2023.07.22 python 멀티프로세싱 pool process 에 대한 정리 (2) 2023.06.20 Streamlit 모듈을 활용한 웹 페이지 디자인 (사이트) (0) 2023.06.09