April 2020
Intermediate to advanced
330 pages
7h 44m
English
At this point, we have defined the environment and our agent, which will make running our model quite straightforward. Remember that to get set up for reinforcement learning using R, we used a technique from object-oriented programming, which is not used very often in a programming language such as R. We created a class that describes an object, but is itself not an object. To create an object from a class, we must instantiate it. We set our initial values and instantiate an object using our DQNAgent class by using the following code:
state_size = 2 action_size = 20agent = DQNAgent(state_size, action_size)
After running this block of code, we will see an agent object in our environment. The agent has a class ...
Read now
Unlock full access