This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExperienceReplay(object): | |
""" | |
During gameplay all the experiences < s, a, r, s’ > are stored in a replay memory. | |
In training, batches of randomly drawn experiences are used to generate the input and target for training. | |
""" | |
def __init__(self, max_memory=100, discount=.9): | |
""" | |
Setup | |
max_memory: the maximum number of experiences we want to store | |
memory: a list of experiences |