agentcontest / massim_2019 Goto Github PK
View Code? Open in Web Editor NEWThe MASSim server 2019 edition
Home Page: https://multiagentcontest.org/2019
License: GNU Affero General Public License v3.0
The MASSim server 2019 edition
Home Page: https://multiagentcontest.org/2019
License: GNU Affero General Public License v3.0
Hi,
I am testing the current source version and I am trying to adapt to the new protocol. During these tests, it seems to me that the things part in the perception is not working correctly. The attached screenshot shows the raw perception of agent A1 in the debugger.
Here, I moved the agent to the right from its initial position and it seemed like the perception range is about 4 blocks. In consequence, I would expect perception about agents B1 and B9 as well as ?dispenser? b2.
Display which blocks/agents are attached to each other.
If I am changing the task probability in the configuration file to something below 1, like in the sample config, the server reports during simulation start [ NORMAL ] ## config.tasks.probability: 0.0
and is never generating tasks.
Not sure if this is a bug or intended behaviour, but based on my understanding of the clear action documentation this seems like this might be a bug.
This issue occurs when agents call the clear(...) action. No marker is perceived by any of the agents. Simulation generated clear events do not encounter this issue.
For example:
agent A1 runs clear(0,1) successfully.
agent A1 and A2 (who are both in the vision range of the clear marker) do not perceive thing(_, _, marker, _)
My understanding of the clear action documentation is that all agents within the vision range of the marker generated by A1 should perceive it. If my understanding is incorrect, please let me know. This issue persists even if the agent calls clear(0,1) successfully three times in a row to invoke the clear event. No perceptions are generated for the markers or agent clear event at all.
After looking into the Simulator code, this seems to be the sequence that causes this issue (in GameState.java):
handleClearAction correctly adds markers to the grid when the agent sends clear(0, 1).
Then, on the next simulation step:
prepareStep deletes the markers (grid.deleteMarkers())
prepareStep then only creates marker thing perceptions for clearEvents (which only contains clear events randomly created by the server).
(If my understanding of the clear action is correct and that the agents should perceive the markers, then I think that all agent-generated markers should also be added to the list of grid markers).
Any clarification would be appreciated. Thank you!
Excellent!
I am very very curious. What about the terrain? Will the levels be fixed? Maybe even randomly generated? Will the levels before tournament be the same as during training?
Not sure if anyone else is having this issue, but I noticed that the server was sending a FAILED action response whenever I submitted a task (even though the required blocks were attached in the correct locations and the agent was on a goal cell). After looking into this further, it looks like the grid used internally by the server is not updated correctly when moving an entity. This issue is not shown on the monitor (all locations are shown correctly). This issue only persists when the server verifies agent actions such as submit or move.
The lines of code that correspond to this issue can be found on Lines 84 and 85 in the file: https://github.com/agentcontest/massim_2019/blob/master/server/src/main/java/massim/game/environment/Grid.java
Lines 84 and 85 are as follows:
insertThing(thing);
thing.setPosition(newPos);
The issue is that insertThing(thing)
updates the thing location on the grid using thing.getPosition()
, but the new position of the thing only gets set after the call to insertThing. This results in the grid not recognizing some entities.
The following code is the definition for insertThing. As we can see, it updates the grid to contain the thing on it's non-updated position.
private boolean insertThing(Positionable thing) {
if (outOfBounds(thing.getPosition())) return false;
getThings(thing.getPosition()).add(thing); // Offending line of code, uses old position of thing
return true;
}
To give an example of this issue, let's say we have an agent on (3,5) that has completed all task requirements for task T and would like to submit the task to goal cell (5,5). The agent does the following:
The server responds with FAILED (agent not on goal cell), although on the monitor the agent is clearly on the goal cell. If we query the Grid object for the agent entity (getThings(new Position(5,5))
) we get an empty set, but the set should contain the agent entity.
The corresponding fix is an easy one. Swap lines 84 and 85 of Grid.java so that the thing position gets updated before insertThing(thing) is called. I've verified this locally, but I welcome other people to reproduce this issue and verify this fix before it is pushed into master. If appropriate, I can submit a pull request with the fix.
Code Fix (this is actually done correctly in the method moveWithoutAttachments() on line 94 in Grid.java):
thing.setPosition(newPos);
insertThing(thing);
Please feel free to provide any comments or suggestions in case I may have missed something!
Thanks,
Michael
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.