rapsealk / gym-navops Goto Github PK
View Code? Open in Web Editor NEWOpenAI Gym interface for NavOps environment.
OpenAI Gym interface for NavOps environment.
기존 코드는 UnityEnvironment
클래스에 Unity
빌드 경로를 전달하기 위하여 환경 변수를 이용한다. (os.environ["RIMPAC_PATH"]
)
이렇게 할 경우 실행 환경이 초기화 될 때마다 수동으로 설정해 주어야 하는 문제가 있다.
>> $Env:RIMPAC_PATH="..."
$ export RIMPAC_PATH="..."
이러한 문제를 해결하기 위하여 코드 내부에서 빌드된 프로그램을 다운받은 후 경로를 설정하도록 한다.
현재 Unity
게임 환경과 Python
모델 간의 통신을 위하여 사용하는 ML-Agents
모듈은 불안정한 문제를 가지고 있다.
이를 개선하기 위하여 gRPC
기반 통신으로 대체한 후 테스트를 진행하고자 한다.
아군과 적군의 시점이 반대이기 때문에 학습 데이터로 사용하는 데에 문제가 있다.
적군의 관측값을 180' 회전 시킬 필요가 있다.
현재 terminal_rewards
를 통해 에피소드 종료 이벤트를 감지하고 있다. (참고: Unity-Technologies/ml-agents#5338)
이 방식을 이용할 경우 임의적으로 값이 전달되지 않는 경우가 발견되었다. 따라서 보조장치로써 SideChannel
을 등록하여 2-way 감지가 가능하도록 하고자 한다.
30 fps
로 실행되는 환경에서 매 프레임마다 Decision Making
을 수행하게 되면 state
의 차이가 크지 않아 불필요한 action
이 중복된다.
이러한 문제를 개선하기 위하여 SkipFrame
을 구현하고자 한다.
env.step()
을 호출하는 과정에서 UnityTimeOutException
이 발생한다.
아래는 에러 로그를 첨부한다.
Traceback (most recent call last):
File "C:\Users\$Env:USERNAME\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File ".\main_lstm.py", line 185, in run
next_obs, reward, done, info = self._env.step(actual_action)
File "c:\users\$Env:USERNAME\desktop\git\gym-rimpac\gym_rimpac\envs\rimpac_env.py", line 84, in step
self._env.step()
File "C:\Users\$Env:USERNAME\AppData\Local\Programs\Python\Python38\lib\site-packages\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "C:\Users\$Env:USERNAME\AppData\Local\Programs\Python\Python38\lib\site-packages\mlagents_envs\environment.py", line 320, in step
outputs = self._communicator.exchange(step_input)
File "C:\Users\$Env:USERNAME\AppData\Local\Programs\Python\Python38\lib\site-packages\mlagents_envs\rpc_communicator.py", line 118, in exchange
self.poll_for_timeout()
File "C:\Users\$Env:USERNAME\AppData\Local\Programs\Python\Python38\lib\site-packages\mlagents_envs\rpc_communicator.py", line 96, in poll_for_timeout
raise UnityTimeOutException(
mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
The environment does not need user interaction to launch
The Agents' Behavior Parameters > Behavior Type is set to "Default"
The environment and the Python interface have compatible versions.
내장된 봇을 이용하는 Single
모드의 경우 승패를 판단하는 로직을 수정해야 한다.
gym-navops/gym_navops/envs/navops_env.py
Lines 132 to 136 in e6ef064
기존의 Rimpac-v0
환경은 실행 시 Unity
를 로딩하는 과정이 필요하기 때문에 고정적인 시간을 소모한다.
이를 개선하기 위하여 논리적으로 동일한 input/output
을 실행하는 Mock 환경을 구현하고자 한다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.