GithubHelp home page GithubHelp logo

agentcontest / massim_2019 Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 2.0 42.69 MB

The MASSim server 2019 edition

Home Page: https://multiagentcontest.org/2019

License: GNU Affero General Public License v3.0

Java 85.33% JavaScript 0.35% TypeScript 10.33% CSS 2.35% HTML 0.39% Python 1.25%

massim_2019's People

Contributors

cehberlin avatar niklasf avatar sarahd93 avatar t-ah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ajahl mbalazs98

massim_2019's Issues

things perception is not working

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.

mapc19_things

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.

task probability <0 are not working

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.

Agent-Invoked Clear Markers Not Showing Up In Perceptions

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):

  1. handleClearAction correctly adds markers to the grid when the agent sends clear(0, 1).

  2. Then, on the next simulation step:

  3. prepareStep deletes the markers (grid.deleteMarkers())

  4. 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!

About the maps.

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?

[BUG] Internal Grid Location For Things Are Incorrect When Updated

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.

Code Responsible for Issue

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;
    }

Example

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:

  1. move(e)
  2. move(e)
  3. submit(T)

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.

Corresponding Fix

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.