Closed ssardina closed 4 years ago
Agree, but remember also that the names in the client side configuration file do not necessarily have to match the entity name in the server team configuration file.
Ie the server refers to them as agentA1, agentA2, etc, but in our configuration we have named them connectionA1, connectionA2...
This brings similar confusion when having to refer to other entities in your actions, you must use the agentA1 name. This was one of the reasons we started using 'player' as a descriptor for agents in the game.
How can we make this clearer? Can we just enforce that these identifiers are the same on the client and server configuration files?
Hi Adam.
OK I have done a first step and pushed into master in ebb774e3785234288d579fc3e56e8cdb20b38c66
From the CLIENT perspective there are three "names":
1) The entity name as listed in the configuration file. What is used to be "connectionA1". I renamed that, even in the json, to "entityA1" to make it explicit. That is actually THE name of an entity being controlled.
2) The username of an entity, which is its credentials to register in the server, like "agentA1" and itis the one in the percept.
3) The EI agent name. This is the interface between EI and the connection entity. This has made everything more cumbersome because this is fictitious for us. The EI is done in a way that one EI Agent may control many entities in the real world. But we do not use that at all. We use to call this "eismassim_
So, basically I have forced (3) = (1) by calling the EI agent name exactly as the entity name it is linked to, 1-to-1. So the EI agent "connectionA1" controles entity "connectionA1" (now renamed to "entityA1".
The MW API does not use 2, the username. So we do not get the percepts from "agentA1", we get them from "entityA1". Similarly we send an action to "entityA1" (old "connectionA1"), not to "agentA1". Note that we don't know the username of the agent until we receive the first sensing percept (yes we have it in the file but is a hack to get it from there).
Now, after the first sensing we have an associated between entity name and username. Do we want to provide the same API we have now but based on the username? so we can sense for "agentA1" instead of "connectionA1"? This may be something we can do easily and could be handly, or will it confuse everything?
The username is like the "nickname" of the connection.
Left some notes here:
It is very confusing to have so many different names of things. We should have:
Entity: the actual entity specified in the connection file and which specifies a connection to some entity. which has itself a username + password
EI Agent: is the agent of the EI. In our case we create one one EI Agent per Entity controlled. So we should just call it the same.
We should get rid of the notion of "player" that is everywhere and is confusing. We connect and controll entities, via intermediate EI agents that are 1-to-1