이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
getObservationInfo
구문
설명
예제
강화 학습 환경에서 행동 및 관측값 정보 추출하기
다른 환경 또는 에이전트를 만드는 데 사용할 수 있는 행동 및 관측값 정보를 추출합니다.
이 예제의 강화 학습 환경은 자기 차량(ego car)과 선행 차량에 대한 간단한 종방향 동역학입니다. 훈련 목표는 자기 차량이 종방향 가속도(그리고 제동)를 제어하여 선행 차량과의 안전 거리를 유지하면서 설정된 속도로 이동하도록 하는 것입니다. 이 예제에서는 Adaptive Cruise Control System Using Model Predictive Control (Model Predictive Control Toolbox) 예제와 동일한 차량 모델을 사용합니다.
모델을 열고 강화 학습 환경을 만듭니다.
mdl = 'rlACCMdl'; open_system(mdl); agentblk = [mdl '/RL Agent']; % create the observation info obsInfo = rlNumericSpec([3 1],'LowerLimit',-inf*ones(3,1),'UpperLimit',inf*ones(3,1)); obsInfo.Name = 'observations'; obsInfo.Description = 'information on velocity error and ego velocity'; % action Info actInfo = rlNumericSpec([1 1],'LowerLimit',-3,'UpperLimit',2); actInfo.Name = 'acceleration'; % define environment env = rlSimulinkEnv(mdl,agentblk,obsInfo,actInfo)
env = SimulinkEnvWithAgent with properties: Model : rlACCMdl AgentBlock : rlACCMdl/RL Agent ResetFcn : [] UseFastRestart : on
강화 학습 환경 env
는 위의 속성을 갖는 SimulinkWithAgent
객체입니다.
강화 학습 환경 env
에서 행동 및 관측값 정보를 추출합니다.
actInfoExt = getActionInfo(env)
actInfoExt = rlNumericSpec with properties: LowerLimit: -3 UpperLimit: 2 Name: "acceleration" Description: [0x0 string] Dimension: [1 1] DataType: "double"
obsInfoExt = getObservationInfo(env)
obsInfoExt = rlNumericSpec with properties: LowerLimit: [3x1 double] UpperLimit: [3x1 double] Name: "observations" Description: "information on velocity error and ego velocity" Dimension: [3 1] DataType: "double"
행동 정보는 가속도 값을 포함하며, 관측값 정보는 자기 차량의 속도와 속도 오차 값을 포함합니다.
입력 인수
env
— 강화 학습 환경
rlFunctionEnv
객체 | SimulinkEnvWithAgent
객체 | rlNeuralNetworkEnvironment
객체 | 미리 정의된 MATLAB 환경 객체
관측값 정보를 추출할 강화 학습 환경으로, 다음 객체 중 하나로 지정됩니다.
다음 객체 중 하나로 표현되는 MATLAB® 환경.
rlPredefinedEnv
를 사용하여 만든 미리 정의된 MATLAB 환경
SimulinkEnvWithAgent
객체로 표현되는 Simulink® 환경.
강화 학습 환경에 대한 자세한 내용은 MATLAB 강화 학습 환경 만들기 및 Simulink 강화 학습 환경 만들기 항목을 참조하십시오.
agent
— 강화 학습 에이전트
rlQAgent
객체 | rlSARSAAgent
객체 | rlDQNAgent
객체 | rlPGAgent
객체 | rlDDPGAgent
객체 | rlTD3Agent
객체 | rlACAgent
객체 | rlPPOAgent
객체 | rlTRPOAgent
객체 | rlSACAgent
객체 | rlMBPOAgent
객체
buffer
— 경험 버퍼
rlReplayMemory
객체 | rlPrioritizedReplayMemory
객체
관측값 정보를 추출할 경험 버퍼로, rlReplayMemory
객체 또는 rlPrioritizedReplayMemory
객체로 지정됩니다.
출력 인수
obsInfo
— 관측값 데이터 사양
rlNumericSpec
객체로 구성된 배열 | rlFiniteSetSpec
객체로 구성된 배열
버전 내역
R2019a에 개발됨
참고 항목
rlNumericSpec
| rlFiniteSetSpec
| getActionInfo
| rlQAgent
| rlSARSAAgent
| rlDQNAgent
| rlPGAgent
| rlACAgent
| rlDDPGAgent
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)