Reputation: 47
So I'm trying to define the action_spec in the py_environment.PyEnvironment Class for a DQN network using TF-Agents. Is action limited to returning integer values? I have read through a few online tutorials and in every case it was for a simple game, like chess or tic tac toe. Where you only needed to define a single integer in a small space to make a move/action.
For my use case, action needs to define sets of coordinates in two dimensional space. To make it more complicated, I want the agent too not only choose the X, Y coordinates but also the number of [X, Y] sets.
I need action to return a list of lists. Something like this:
action = [[100, 200], [300, 350], [550, 876]]
With this in mind; I'm not entirely sure how to define action_spec.
I saw this thread here: tf_agents custom time_step_spec
Where it shows the use of a dictionary of ArraySpecs(). Is that what I need to do?
Upvotes: 1
Views: 375
Reputation: 47
SO according to this link: https://github.com/tensorflow/agents/issues/329
DQN for TF-Agents only supports a single action. As in the dimensions of the action_spec cannot be larger than shape(1,)
. Keep this in mind before using TF-Agents.
Upvotes: 1