I'm tying to make a multi agent implementation of the 3x3 grid (grid0) for traffic light control
In the get_state
function, I want to differ in the information that I sent to the RL agent in this function. So agent 1 get only the information of vehicles driving on edges heading towards intersection 1.
In my understanding the `get_state function is called for each agent.
How can I distinguish between agents? Is it possible to do something like this?
agent_id = get_agent_id()
if agent_id =0
#return 'all info of vehicles on edges heading to traffic light1
if agent_id =1
...
is there any way or function like this (agent list or something) to distinguish between the different agents in the get_state
function?
And second, are the agent_id's the same as the traffic light id's (intersection_id's)? (And how do I assign a different agent to each intersection? Now I just use the default grid0
scenario, but I like to use multi-agent environment).
Thanks in advance!