Skip to content
Discussion options

You must be logged in to vote

Interesting discussion!

For a possible solution, I'd go for a lock to change/consult the env. state. For instance, in your env. class, override the getPercepts with a lock so that no agent is getting perception while it is being changed:

    Object myLock = new Object();
    public Collection<Literal> getPercepts(String agName) {
        synchronize(myLock) {
             return super.getPercepts(agName);
        }
    }

then surround the code that changes the environment by synchronize(myLock) { .... }

In case you implement it, let us know if it works.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mindcrime
Comment options

Answer selected by mindcrime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants