BaşlayınÜcretsiz Başlayın

The double-ended queue

Familiarize yourself the with Double-Ended Queue data structure which you will use as replay buffer.

The Double Ended Queue, or deque is a limited capacity queue which 'forgets' its oldest items as new items are added over time. This provides a well suited abstraction to support the replay buffer.

Bu egzersiz

Deep Reinforcement Learning in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

from collections import deque
buffer = deque(range(10))
print('Buffer initialized as:', buffer)
# Append 10 to the right of the buffer
buffer.____
print('Buffer after appending:', buffer)
Kodu Düzenle ve Çalıştır