eishub / eis

The Environment Interface Standard (EIS) is a Java-based interface standard for connecting agents to controllable entities in an environment such as a game. The interface provides support for managing the connection (e.g., for pausing and terminating an environment) and for interaction between agents and entities that are available in an environment (e.g., bots in a game). An agent that is connected to a controllable entity receives percepts from and can send actions to that entity. Percepts inform the agent about the state of the entity and its environment. Actions tell the entity which actions to perform in its environment. Several example implementations of environments are available @github.com/eishub. A default implementation of the EIS interface is also provided.
GNU General Public License v3.0
9 stars 4 forks source link

EIS.deleteAssociation() returns null in some cases #26

Open koenhindriks opened 10 years ago

koenhindriks commented 10 years ago

When you call EIS.deleteAssociation(entity) where entity HAS NO associations, the call returns null instead of the expected empty list.

This causes a nullpointer exception when you kill an environment with un-associated entities.

reproduce:

Wouter1 commented 10 years ago

Please clarify. EIS is only an interface and does not return anything. Are you referring to the Default implementation?

Wouter1 commented 9 years ago

I followed the procedure above with SimpleIDE, but I do not see any exceptions

Received new entity named car2.
WARNING: WARNING: None of the launch rules in the MAS applies for entity car2 of type car because maximum number of times rules can be applied has been reached
WARNING: WARNING: Failed to get percepts from environment.
 because environment does not run but is paused.WARNING: WARNING: Failed to get percepts from environment.
 because environment does not run but is paused.Shutting down MAS.
Messages->Runtime stopped.
Runtime->Messages stopped.
GOAL agent elevator terminated successfully.
GOAL agent elevator terminated successfully.
GOAL agent elevator_0 terminated successfully.
GOAL agent elevator_0 terminated successfully.
Environment->Messages stopped.
Messages->Environment stopped.
done.
The multi-agent system elevator.mas2g has been terminated.