You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classWorld: # multi-agent worlddef__init__(self):
# list of agents and entities (can change at execution-time!)self.agents= []
self.landmarks= []
# communication channel dimensionalityself.dim_c=0# position dimensionalityself.dim_p=2# color dimensionalityself.dim_color=3# simulation timestepself.dt=0.1# physical dampingself.damping=0.25# contact response parametersself.contact_force=1e2self.contact_margin=1e-3
In particular, there is no attribute called food. However, in the code for the Scenario of Simple World Comm, we see:
This still requires # pyright : ignore.
(NB : While it's not the case for this specific example, if we had to do something like self.attribute = None, we would then be in the situation of Issue #2 .)
3. Change definition of World to include:
...
self.food : list[Landmark] = []
Something else.
In the current PR #1 , I've chosen option 3. I'm not wedded to this.
Would love to hear people's thoughts!
The text was updated successfully, but these errors were encountered:
This issue is a place to discuss the conventions for attributes which are defined for a specific instance of a class only.
Here is a concrete example. In the current implementation of the
World
class, we have:In particular, there is no attribute called
food
. However, in the code for theScenario
of Simple World Comm, we see:Proposals
# pyright:ignore
).World
to include:This still requires
# pyright : ignore
.(NB : While it's not the case for this specific example, if we had to do something like
self.attribute = None
, we would then be in the situation of Issue #2 .)3. Change definition of
World
to include:In the current PR #1 , I've chosen option 3. I'm not wedded to this.
Would love to hear people's thoughts!
The text was updated successfully, but these errors were encountered: