배치가 완료되었는지 확인한다. 배치 크기는 배치 크기 변수로 정의한다. 배치가 완료되면 재생 버퍼 함수
로 이동하고
Q
예측과
Q
타깃 사이의
MSE
를 최소화해
Q
함수를 업데이트한다. 그렇지 않은 경우 다음
시간 단계로 이동한다.
이 코드는 각 에피소드의 최종 결과와 함께 에피소드별 매도 및 매수 동작과 총수익을 보여
주는 도표를 생성한다.
window_size = 1
agent = Agent(window_size)
l = len(data) - 1
batch_size = 10
states_sell = []
states_buy = []
episode_count = 3
for e in range(episode_count + 1):
print(“Episode ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.