도움말 센터도움말 센터
재생 메모리 경험 버퍼의 크기 조정
R2022b 이후
resize(buffer,maxLength)
예제
resize(buffer,maxLength)는 최대 길이가 maxLength가 되도록 경험 버퍼 buffer의 크기를 조정합니다.
buffer
maxLength
maxLength가 버퍼에 저장된 경험 수보다 크거나 같으면 buffer는 저장된 경험을 유지합니다.
maxLength가 버퍼에 저장된 경험 수보다 작으면 buffer는 maxLength개의 최근 경험만 유지합니다.
모두 축소
에이전트 훈련을 위한 환경을 만듭니다. 이 예제에서는 미리 정의된 환경을 불러옵니다.
env = rlPredefinedEnv("SimplePendulumWithImage-Discrete");
에이전트에서 관측값 사양과 행동 사양을 추출합니다.
obsInfo = getObservationInfo(env); actInfo = getActionInfo(env);
환경 사양에서 DQN 에이전트를 만듭니다.
agent = rlDQNAgent(obsInfo,actInfo);
기본적으로, 에이전트는 최대 크기가 10,000인 경험 버퍼를 사용합니다.
agent.ExperienceBuffer
ans = rlReplayMemory with properties: MaxLength: 10000 Length: 0
경험 버퍼의 최대 크기를 20,000으로 늘립니다.
resize(agent.ExperienceBuffer,20000)
업데이트된 경험 버퍼를 표시합니다.
ans = rlReplayMemory with properties: MaxLength: 20000 Length: 0
rlReplayMemory
rlPrioritizedReplayMemory
rlHindsightReplayMemory
rlHindsightPrioritizedReplayMemory
경험 버퍼로, 다음과 같은 replay memory 객체 중 하나로 지정됩니다.
최대 버퍼 길이로, 음이 아닌 정수로 지정됩니다.
R2022b에 개발됨
append
sample
allExperiences
validateExperience
generateHindsightExperiences
다음 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office