Code Monkey home page Code Monkey logo

gossip_problem_generator's Introduction

Usage:

./problem_generator.py d n percentageOfNegativeGoals "existing negative goals"

Example:

./problem_generator.py 1 4 0.60 "1-2 2-1 4-3"

You do not have to provide a seed ("existing negative goals" and "1-2 2-1 4-3" above).
If you do, it will respect the provided negative goals and add new ones to reach percentageOfNegativeGoals negative goals per agent.
Seed must always be in " and the negative goals must be seperated by " "(space).
Always use - between agent-secret.

Generated problem instance is saved in a file named problem_d_n_percentage.pddl.
The example above would output the resulting instance to problem_1_4_60.pddl.

It also prints a line similiar to the provided seed input which can be used as seed for new instances.

If you enter a percentage lower than the seed (for the example above, asking for 0% negative goals per agent), it will throw "ValueError: Sample larger than population or is negative". It can not remove negative goals therefore it can not achieve less negative goals than the provided seed.

It also applies to 100% (1.0). Each agent knows their own piece of the secret to begin with and we can not make agents forget the secrets that they know.

If you want to have true 100% negative goals per agent (which will always be infeasible), you can comment out the 37th line of goal_generator.py.

while ! singularity run -C -H $MYRUNDIR $MYPLANNER $MYDOMAIN "$MYRUNDIR/random/problem_d_n_p.pddl" $MYRUNDIR/sas_plan; do path/to/gossip_problem_generator/problem_generator.py d n 0.p; done

while a plan can not be found for the problem_d_n_p.pddl on MYDOMAIN generate a new problem instance (goal state instance)

gossip_problem_generator's People

Contributors

hasimsait avatar

Watchers

 avatar

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.