├── .github └── workflows │ ├── build_wheel.yml │ ├── macos.yml │ ├── pre_commit.yml │ ├── pypi_deployment.yml │ ├── python-package.yml │ └── ubuntu.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.rst ├── Dockerfile ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── docs ├── .nojekyll ├── _sphinx_src │ ├── Makefile │ ├── api │ │ ├── modules.rst │ │ ├── pomdp_py.algorithms.bsp.rst │ │ ├── pomdp_py.algorithms.rst │ │ ├── pomdp_py.algorithms.visual.rst │ │ ├── pomdp_py.framework.rst │ │ ├── pomdp_py.problems.light_dark.agent.rst │ │ ├── pomdp_py.problems.light_dark.domain.rst │ │ ├── pomdp_py.problems.light_dark.env.rst │ │ ├── pomdp_py.problems.light_dark.models.rst │ │ ├── pomdp_py.problems.light_dark.rst │ │ ├── pomdp_py.problems.load_unload.rst │ │ ├── pomdp_py.problems.maze.domain.rst │ │ ├── pomdp_py.problems.maze.env.rst │ │ ├── pomdp_py.problems.maze.models.components.rst │ │ ├── pomdp_py.problems.maze.models.rst │ │ ├── pomdp_py.problems.maze.rst │ │ ├── pomdp_py.problems.multi_object_search.agent.rst │ │ ├── pomdp_py.problems.multi_object_search.domain.rst │ │ ├── pomdp_py.problems.multi_object_search.env.rst │ │ ├── pomdp_py.problems.multi_object_search.models.components.rst │ │ ├── pomdp_py.problems.multi_object_search.models.rst │ │ ├── pomdp_py.problems.multi_object_search.rst │ │ ├── pomdp_py.problems.rocksample.cythonize.rst │ │ ├── pomdp_py.problems.rocksample.rst │ │ ├── pomdp_py.problems.rst │ │ ├── pomdp_py.problems.tag.agent.rst │ │ ├── pomdp_py.problems.tag.domain.rst │ │ ├── pomdp_py.problems.tag.env.rst │ │ ├── pomdp_py.problems.tag.models.components.rst │ │ ├── pomdp_py.problems.tag.models.rst │ │ ├── pomdp_py.problems.tag.rst │ │ ├── pomdp_py.problems.tiger.cythonize.rst │ │ ├── pomdp_py.problems.tiger.rst │ │ ├── pomdp_py.representations.belief.rst │ │ ├── pomdp_py.representations.distribution.rst │ │ ├── pomdp_py.representations.rst │ │ ├── pomdp_py.rst │ │ ├── pomdp_py.utils.debugging.rst │ │ ├── pomdp_py.utils.interfaces.rst │ │ ├── pomdp_py.utils.rst │ │ ├── pomdp_py.visual.rst │ │ └── refs.bib │ ├── building_docs.rst │ ├── changelog.rst │ ├── conf.py │ ├── design_principles.rst │ ├── examples.action_prior.rst │ ├── examples.external_solvers.rst │ ├── examples.mos.rst │ ├── examples.rst │ ├── examples.tiger.rst │ ├── existing_domains.rst │ ├── existing_solvers.rst │ ├── extensions.rst │ ├── images │ │ ├── bigai.png │ │ ├── brown.png │ │ ├── brown.svg │ │ ├── brown_logo.png │ │ ├── favicon.ico │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── mos.png │ │ ├── mos.svg │ │ ├── mos_window.png │ │ └── tree.png │ ├── index.rst │ ├── installation.rst │ ├── make.bat │ ├── modules.rst │ ├── other_libraries.rst │ ├── pomdp.jpg │ ├── refs.bib │ └── static │ │ ├── custom.css │ │ ├── expected_test_output.txt │ │ └── logo.png ├── html │ ├── _images │ │ ├── brown_logo.png │ │ ├── mos.png │ │ ├── mos_window.png │ │ └── pomdp.jpg │ ├── _modules │ │ ├── index.html │ │ ├── pomdp_py │ │ │ ├── algorithms │ │ │ │ └── bsp │ │ │ │ │ └── blqr.html │ │ │ ├── problems │ │ │ │ ├── light_dark │ │ │ │ │ └── env │ │ │ │ │ │ ├── env.html │ │ │ │ │ │ └── plotting.html │ │ │ │ ├── load_unload │ │ │ │ │ └── load_unload.html │ │ │ │ ├── maze │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── observation.html │ │ │ │ │ │ └── state.html │ │ │ │ │ └── env │ │ │ │ │ │ └── env.html │ │ │ │ ├── multi_object_search │ │ │ │ │ ├── agent │ │ │ │ │ │ ├── agent.html │ │ │ │ │ │ └── belief.html │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── action.html │ │ │ │ │ │ ├── observation.html │ │ │ │ │ │ └── state.html │ │ │ │ │ ├── env │ │ │ │ │ │ ├── env.html │ │ │ │ │ │ └── visual.html │ │ │ │ │ ├── example_worlds.html │ │ │ │ │ ├── models │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── grid_map.html │ │ │ │ │ │ │ └── sensor.html │ │ │ │ │ │ ├── observation_model.html │ │ │ │ │ │ ├── policy_model.html │ │ │ │ │ │ ├── reward_model.html │ │ │ │ │ │ └── transition_model.html │ │ │ │ │ └── problem.html │ │ │ │ ├── rocksample │ │ │ │ │ └── rocksample_problem.html │ │ │ │ ├── tag │ │ │ │ │ ├── agent │ │ │ │ │ │ └── agent.html │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── action.html │ │ │ │ │ │ ├── observation.html │ │ │ │ │ │ └── state.html │ │ │ │ │ ├── env │ │ │ │ │ │ ├── env.html │ │ │ │ │ │ └── visual.html │ │ │ │ │ ├── experiment.html │ │ │ │ │ ├── models │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── grid_map.html │ │ │ │ │ │ │ └── motion_policy.html │ │ │ │ │ │ ├── observation_model.html │ │ │ │ │ │ ├── policy_model.html │ │ │ │ │ │ ├── reward_model.html │ │ │ │ │ │ └── transition_model.html │ │ │ │ │ └── problem.html │ │ │ │ └── tiger │ │ │ │ │ └── tiger_problem.html │ │ │ ├── representations │ │ │ │ └── belief │ │ │ │ │ └── histogram.html │ │ │ └── utils │ │ │ │ ├── colors.html │ │ │ │ ├── debugging.html │ │ │ │ ├── interfaces │ │ │ │ ├── conversion.html │ │ │ │ └── solvers.html │ │ │ │ ├── math.html │ │ │ │ ├── misc.html │ │ │ │ ├── templates.html │ │ │ │ └── typ.html │ │ └── problems │ │ │ ├── load_unload │ │ │ └── load_unload.html │ │ │ ├── maze │ │ │ ├── domain │ │ │ │ ├── observation.html │ │ │ │ └── state.html │ │ │ └── env │ │ │ │ └── env.html │ │ │ ├── multi_object_search │ │ │ ├── agent │ │ │ │ ├── agent.html │ │ │ │ └── belief.html │ │ │ ├── domain │ │ │ │ ├── action.html │ │ │ │ ├── observation.html │ │ │ │ └── state.html │ │ │ ├── env │ │ │ │ ├── env.html │ │ │ │ └── visual.html │ │ │ ├── example_worlds.html │ │ │ ├── models │ │ │ │ ├── components │ │ │ │ │ ├── grid_map.html │ │ │ │ │ └── sensor.html │ │ │ │ ├── observation_model.html │ │ │ │ ├── policy_model.html │ │ │ │ ├── reward_model.html │ │ │ │ └── transition_model.html │ │ │ └── problem.html │ │ │ ├── rocksample │ │ │ └── rocksample_problem.html │ │ │ ├── tag │ │ │ ├── agent │ │ │ │ └── agent.html │ │ │ ├── domain │ │ │ │ ├── action.html │ │ │ │ ├── observation.html │ │ │ │ └── state.html │ │ │ ├── env │ │ │ │ ├── env.html │ │ │ │ └── visual.html │ │ │ ├── experiment.html │ │ │ ├── models │ │ │ │ ├── components │ │ │ │ │ ├── grid_map.html │ │ │ │ │ └── motion_policy.html │ │ │ │ ├── observation_model.html │ │ │ │ ├── policy_model.html │ │ │ │ ├── reward_model.html │ │ │ │ └── transition_model.html │ │ │ └── problem.html │ │ │ └── tiger │ │ │ └── tiger_problem.html │ ├── _sources │ │ ├── api │ │ │ ├── modules.rst.txt │ │ │ ├── pomdp_py.algorithms.bsp.rst.txt │ │ │ ├── pomdp_py.algorithms.rst.txt │ │ │ ├── pomdp_py.algorithms.visual.rst.txt │ │ │ ├── pomdp_py.framework.rst.txt │ │ │ ├── pomdp_py.problems.lasertag.rst.txt │ │ │ ├── pomdp_py.problems.light_dark.agent.rst.txt │ │ │ ├── pomdp_py.problems.light_dark.domain.rst.txt │ │ │ ├── pomdp_py.problems.light_dark.env.rst.txt │ │ │ ├── pomdp_py.problems.light_dark.models.rst.txt │ │ │ ├── pomdp_py.problems.light_dark.rst.txt │ │ │ ├── pomdp_py.problems.load_unload.rst.txt │ │ │ ├── pomdp_py.problems.maze.domain.rst.txt │ │ │ ├── pomdp_py.problems.maze.env.rst.txt │ │ │ ├── pomdp_py.problems.maze.models.components.rst.txt │ │ │ ├── pomdp_py.problems.maze.models.rst.txt │ │ │ ├── pomdp_py.problems.maze.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.agent.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.domain.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.env.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.models.components.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.models.rst.txt │ │ │ ├── pomdp_py.problems.multi_object_search.rst.txt │ │ │ ├── pomdp_py.problems.rocksample.cythonize.rst.txt │ │ │ ├── pomdp_py.problems.rocksample.rst.txt │ │ │ ├── pomdp_py.problems.rst.txt │ │ │ ├── pomdp_py.problems.tag.agent.rst.txt │ │ │ ├── pomdp_py.problems.tag.domain.rst.txt │ │ │ ├── pomdp_py.problems.tag.env.rst.txt │ │ │ ├── pomdp_py.problems.tag.models.components.rst.txt │ │ │ ├── pomdp_py.problems.tag.models.rst.txt │ │ │ ├── pomdp_py.problems.tag.rst.txt │ │ │ ├── pomdp_py.problems.tiger.cythonize.rst.txt │ │ │ ├── pomdp_py.problems.tiger.rst.txt │ │ │ ├── pomdp_py.representations.belief.rst.txt │ │ │ ├── pomdp_py.representations.distribution.rst.txt │ │ │ ├── pomdp_py.representations.rst.txt │ │ │ ├── pomdp_py.rst.txt │ │ │ ├── pomdp_py.utils.debugging.rst.txt │ │ │ ├── pomdp_py.utils.interfaces.rst.txt │ │ │ ├── pomdp_py.utils.rst.txt │ │ │ └── pomdp_py.visual.rst.txt │ │ ├── building_docs.rst.txt │ │ ├── changelog.rst.txt │ │ ├── design_principles.rst.txt │ │ ├── examples.action_prior.rst.txt │ │ ├── examples.external_solvers.rst.txt │ │ ├── examples.mos.rst.txt │ │ ├── examples.rst.txt │ │ ├── examples.tiger.rst.txt │ │ ├── existing_domains.rst.txt │ │ ├── existing_solvers.rst.txt │ │ ├── extensions.rst.txt │ │ ├── index.rst.txt │ │ ├── installation.rst.txt │ │ ├── modules.rst.txt │ │ ├── other_libraries.rst.txt │ │ ├── problems │ │ │ ├── modules.rst.txt │ │ │ ├── problems.lasertag.rst.txt │ │ │ ├── problems.light_dark.agent.rst.txt │ │ │ ├── problems.light_dark.domain.rst.txt │ │ │ ├── problems.light_dark.env.rst.txt │ │ │ ├── problems.light_dark.models.rst.txt │ │ │ ├── problems.light_dark.rst.txt │ │ │ ├── problems.load_unload.rst.txt │ │ │ ├── problems.maze.domain.rst.txt │ │ │ ├── problems.maze.env.rst.txt │ │ │ ├── problems.maze.models.components.rst.txt │ │ │ ├── problems.maze.models.rst.txt │ │ │ ├── problems.maze.rst.txt │ │ │ ├── problems.multi_object_search.agent.rst.txt │ │ │ ├── problems.multi_object_search.domain.rst.txt │ │ │ ├── problems.multi_object_search.env.rst.txt │ │ │ ├── problems.multi_object_search.models.components.rst.txt │ │ │ ├── problems.multi_object_search.models.rst.txt │ │ │ ├── problems.multi_object_search.rst.txt │ │ │ ├── problems.rocksample.cythonize.rst.txt │ │ │ ├── problems.rocksample.rst.txt │ │ │ ├── problems.rst.txt │ │ │ ├── problems.tag.agent.rst.txt │ │ │ ├── problems.tag.domain.rst.txt │ │ │ ├── problems.tag.env.rst.txt │ │ │ ├── problems.tag.models.components.rst.txt │ │ │ ├── problems.tag.models.rst.txt │ │ │ ├── problems.tag.rst.txt │ │ │ ├── problems.tiger.cythonize.rst.txt │ │ │ └── problems.tiger.rst.txt │ │ └── simple_rl_integration.rst.txt │ ├── _static │ │ ├── alabaster.css │ │ ├── basic.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── expected_test_output.txt │ │ ├── favicon.ico │ │ ├── file.png │ │ ├── language_data.js │ │ ├── logo.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ └── sphinx_highlight.js │ ├── api │ │ ├── modules.html │ │ ├── pomdp_py.algorithms.bsp.html │ │ ├── pomdp_py.algorithms.html │ │ ├── pomdp_py.algorithms.visual.html │ │ ├── pomdp_py.framework.html │ │ ├── pomdp_py.html │ │ ├── pomdp_py.problems.html │ │ ├── pomdp_py.problems.lasertag.html │ │ ├── pomdp_py.problems.light_dark.agent.html │ │ ├── pomdp_py.problems.light_dark.domain.html │ │ ├── pomdp_py.problems.light_dark.env.html │ │ ├── pomdp_py.problems.light_dark.html │ │ ├── pomdp_py.problems.light_dark.models.html │ │ ├── pomdp_py.problems.load_unload.html │ │ ├── pomdp_py.problems.maze.domain.html │ │ ├── pomdp_py.problems.maze.env.html │ │ ├── pomdp_py.problems.maze.html │ │ ├── pomdp_py.problems.maze.models.components.html │ │ ├── pomdp_py.problems.maze.models.html │ │ ├── pomdp_py.problems.multi_object_search.agent.html │ │ ├── pomdp_py.problems.multi_object_search.domain.html │ │ ├── pomdp_py.problems.multi_object_search.env.html │ │ ├── pomdp_py.problems.multi_object_search.html │ │ ├── pomdp_py.problems.multi_object_search.models.components.html │ │ ├── pomdp_py.problems.multi_object_search.models.html │ │ ├── pomdp_py.problems.rocksample.cythonize.html │ │ ├── pomdp_py.problems.rocksample.html │ │ ├── pomdp_py.problems.tag.agent.html │ │ ├── pomdp_py.problems.tag.domain.html │ │ ├── pomdp_py.problems.tag.env.html │ │ ├── pomdp_py.problems.tag.html │ │ ├── pomdp_py.problems.tag.models.components.html │ │ ├── pomdp_py.problems.tag.models.html │ │ ├── pomdp_py.problems.tiger.cythonize.html │ │ ├── pomdp_py.problems.tiger.html │ │ ├── pomdp_py.representations.belief.html │ │ ├── pomdp_py.representations.distribution.html │ │ ├── pomdp_py.representations.html │ │ ├── pomdp_py.utils.debugging.html │ │ ├── pomdp_py.utils.html │ │ ├── pomdp_py.utils.interfaces.html │ │ └── pomdp_py.visual.html │ ├── building_docs.html │ ├── changelog.html │ ├── design_principles.html │ ├── examples.action_prior.html │ ├── examples.external_solvers.html │ ├── examples.html │ ├── examples.mos.html │ ├── examples.tiger.html │ ├── existing_domains.html │ ├── existing_solvers.html │ ├── extensions.html │ ├── genindex.html │ ├── index.html │ ├── installation.html │ ├── modules.html │ ├── objects.inv │ ├── other_libraries.html │ ├── problems │ │ ├── modules.html │ │ ├── problems.html │ │ ├── problems.lasertag.html │ │ ├── problems.light_dark.agent.html │ │ ├── problems.light_dark.domain.html │ │ ├── problems.light_dark.env.html │ │ ├── problems.light_dark.html │ │ ├── problems.light_dark.models.html │ │ ├── problems.load_unload.html │ │ ├── problems.maze.domain.html │ │ ├── problems.maze.env.html │ │ ├── problems.maze.html │ │ ├── problems.maze.models.components.html │ │ ├── problems.maze.models.html │ │ ├── problems.multi_object_search.agent.html │ │ ├── problems.multi_object_search.domain.html │ │ ├── problems.multi_object_search.env.html │ │ ├── problems.multi_object_search.html │ │ ├── problems.multi_object_search.models.components.html │ │ ├── problems.multi_object_search.models.html │ │ ├── problems.rocksample.cythonize.html │ │ ├── problems.rocksample.html │ │ ├── problems.tag.agent.html │ │ ├── problems.tag.domain.html │ │ ├── problems.tag.env.html │ │ ├── problems.tag.html │ │ ├── problems.tag.models.components.html │ │ ├── problems.tag.models.html │ │ ├── problems.tiger.cythonize.html │ │ └── problems.tiger.html │ ├── py-modindex.html │ ├── search.html │ ├── searchindex.js │ └── simple_rl_integration.html └── index.html ├── pomdp_py ├── __init__.py ├── __main__.py ├── algorithms │ ├── __init__.py │ ├── bsp │ │ ├── README.rst │ │ ├── __init__.py │ │ └── blqr.py │ ├── po_rollout.pxd │ ├── po_rollout.pyx │ ├── po_uct.pxd │ ├── po_uct.pyx │ ├── pomcp.pxd │ ├── pomcp.pyx │ ├── value_function.py │ ├── value_iteration.pxd │ └── value_iteration.pyx ├── framework │ ├── __init__.py │ ├── basics.pxd │ ├── basics.pyx │ ├── oopomdp.pxd │ ├── oopomdp.pyx │ ├── planner.pxd │ └── planner.pyx ├── problems │ ├── __init__.py │ ├── lasertag │ │ ├── README.rst │ │ └── __init__.py │ ├── light_dark │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── agent │ │ │ ├── __init__.py │ │ │ └── belief.py │ │ ├── domain │ │ │ ├── __init__.py │ │ │ ├── action.py │ │ │ ├── observation.py │ │ │ └── state.py │ │ ├── env │ │ │ ├── __init__.py │ │ │ ├── env.py │ │ │ ├── plotting.py │ │ │ └── visual.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── observation_model.py │ │ │ └── transition_model.py │ │ ├── problem_discrete.py │ │ └── test.py │ ├── load_unload │ │ ├── README.rst │ │ ├── __init__.py │ │ └── load_unload.py │ ├── maze │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── domain │ │ │ ├── __init__.py │ │ │ ├── action.py │ │ │ ├── observation.py │ │ │ └── state.py │ │ ├── env │ │ │ ├── __init__.py │ │ │ └── env.py │ │ └── models │ │ │ ├── __init__.py │ │ │ └── components │ │ │ ├── __init__.py │ │ │ └── map.py │ ├── multi_object_search │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── agent │ │ │ ├── __init__.py │ │ │ ├── agent.py │ │ │ └── belief.py │ │ ├── domain │ │ │ ├── __init__.py │ │ │ ├── action.py │ │ │ ├── observation.py │ │ │ └── state.py │ │ ├── env │ │ │ ├── __init__.py │ │ │ ├── env.py │ │ │ └── visual.py │ │ ├── example_worlds.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── components │ │ │ │ ├── __init__.py │ │ │ │ ├── grid_map.py │ │ │ │ └── sensor.py │ │ │ ├── observation_model.py │ │ │ ├── policy_model.py │ │ │ ├── reward_model.py │ │ │ └── transition_model.py │ │ └── problem.py │ ├── rocksample │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── cythonize │ │ │ ├── __init__.py │ │ │ ├── rocksample_problem.pyx │ │ │ └── run_rocksample.py │ │ └── rocksample_problem.py │ ├── tag │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── agent │ │ │ ├── __init__.py │ │ │ └── agent.py │ │ ├── constants.py │ │ ├── domain │ │ │ ├── __init__.py │ │ │ ├── action.py │ │ │ ├── observation.py │ │ │ └── state.py │ │ ├── env │ │ │ ├── __init__.py │ │ │ ├── env.py │ │ │ └── visual.py │ │ ├── example_worlds.py │ │ ├── experiment.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── components │ │ │ │ ├── __init__.py │ │ │ │ ├── grid_map.py │ │ │ │ └── motion_policy.py │ │ │ ├── observation_model.py │ │ │ ├── policy_model.py │ │ │ ├── reward_model.py │ │ │ └── transition_model.py │ │ └── problem.py │ └── tiger │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── cythonize │ │ ├── __init__.py │ │ ├── run_tiger.py │ │ └── tiger_problem.pyx │ │ └── tiger_problem.py ├── representations │ ├── __init__.py │ ├── belief │ │ ├── __init__.py │ │ ├── histogram.py │ │ ├── particles.pxd │ │ └── particles.pyx │ └── distribution │ │ ├── __init__.py │ │ ├── gaussian.pxd │ │ ├── gaussian.pyx │ │ ├── histogram.pxd │ │ ├── histogram.pyx │ │ ├── particles.pxd │ │ └── particles.pyx └── utils │ ├── __init__.py │ ├── colors.py │ ├── cython_utils.pxd │ ├── cython_utils.pyx │ ├── debugging.py │ ├── interfaces │ ├── __init__.py │ ├── conversion.py │ ├── simple_rl.py │ └── solvers.py │ ├── math.py │ ├── misc.py │ ├── templates.py │ └── typ.py ├── pyproject.toml ├── scripts └── pomdp_py_release.sh ├── setup.py └── tests ├── README.md ├── appl.patch ├── test_all.py ├── test_conversion_pomdp-solve.py ├── test_conversion_pomdpx.py ├── test_framework_basics.py ├── test_hashing_pickling.py ├── test_particles.py ├── test_sarsop.py ├── test_tree_debugger.py └── test_vi_pruning.py /.github/workflows/build_wheel.yml: -------------------------------------------------------------------------------- 1 | name: pomdp-py build dev-latest wheel 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'vdev-latest' # trigger on the tag vdev-latest 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | fail-fast: true 17 | steps: 18 | 19 | - name: Set release name with date 20 | id: set_release_name 21 | run: echo "RELEASE_NAME=pomdp-py (dev-latest $(date +'%Y-%m-%d'))" >> $GITHUB_ENV 22 | 23 | - uses: actions/checkout@v4 24 | with: 25 | ref: 'dev-latest' 26 | 27 | - uses: actions/setup-python@v5 28 | with: 29 | python-version: '3.10' 30 | 31 | - name: Install dependencies 32 | run: | 33 | python -m pip install --upgrade pip 34 | 35 | - name: Run release script 36 | working-directory: . 37 | run: | 38 | cd scripts 39 | ./pomdp_py_release.sh 40 | 41 | - name: Release artifact 42 | uses: softprops/action-gh-release@v1 43 | with: 44 | name: ${{ env.RELEASE_NAME }} 45 | files: dist/*.whl 46 | -------------------------------------------------------------------------------- /.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: pomdp-py repo macOS build 2 | 3 | on: 4 | push: 5 | branches: [ main, dev-latest ] 6 | pull_request: 7 | types: 8 | - opened 9 | - reopened 10 | - synchronize 11 | - labeled 12 | - unlabeled 13 | - ready_for_review 14 | 15 | concurrency: 16 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 17 | cancel-in-progress: true 18 | 19 | jobs: 20 | build: 21 | runs-on: macos-latest 22 | strategy: 23 | fail-fast: true 24 | steps: 25 | - uses: actions/checkout@v4 26 | - uses: actions/setup-python@v5 27 | with: 28 | python-version: '3.10' 29 | - name: Build dependencies 30 | run: | 31 | # Install pomdp-solve macOS binary 32 | wget -P thirdparty https://www.pomdp.org/code/pomdp-solve-os-x.bin 33 | chmod +x thirdparty/pomdp-solve-os-x.bin 34 | 35 | # Build and install SARSOP 36 | git clone https://github.com/personalrobotics/appl.git thirdparty/appl 37 | # Fix Arm build (remove -mfpmath=sse) and declare implict functions 38 | git -C thirdparty/appl apply ../../tests/appl.patch 39 | make -C thirdparty/appl/src 40 | make -C thirdparty/appl/src install 41 | - name: Install dependencies 42 | run: | 43 | python -m pip install --upgrade pip 44 | pip install -e . 45 | - name: Test 46 | working-directory: . 47 | run: | 48 | export POMDP_SOLVE_PATH=./thirdparty/pomdp-solve-os-x.bin 49 | export POMDPSOL_PATH=./thirdparty/appl/bin/pomdpsol 50 | export POMDPCONVERT_PATH=./thirdparty/appl/src/pomdpconvert 51 | python tests/test_all.py 52 | -------------------------------------------------------------------------------- /.github/workflows/pre_commit.yml: -------------------------------------------------------------------------------- 1 | name: Pre-Commit 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | types: 9 | - opened 10 | - reopened 11 | - synchronize 12 | - labeled 13 | - unlabeled 14 | - ready_for_review 15 | 16 | jobs: 17 | pre-commit: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@v3 21 | - uses: actions/setup-python@v3 22 | - uses: pre-commit/action@v3.0.0 23 | -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: pomdp-py package 5 | 6 | on: 7 | push: 8 | branches: [ "main", "dev-latest" ] 9 | pull_request: 10 | types: 11 | - opened 12 | - reopened 13 | - synchronize 14 | - labeled 15 | - unlabeled 16 | - ready_for_review 17 | 18 | jobs: 19 | build: 20 | 21 | runs-on: ubuntu-latest 22 | strategy: 23 | fail-fast: false 24 | matrix: 25 | python-version: ["3.9", "3.10", "3.11", "3.12"] 26 | 27 | steps: 28 | - uses: actions/checkout@v3 29 | - name: Set up Python ${{ matrix.python-version }} 30 | uses: actions/setup-python@v3 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | - name: Install dependencies 34 | run: | 35 | python -m pip install --upgrade pip 36 | pip install -e . 37 | - name: Test 38 | run: | 39 | python tests/test_all.py 40 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | name: pomdp-py repo ubuntu build 2 | 3 | on: 4 | push: 5 | branches: [ main, dev-latest ] 6 | pull_request: 7 | types: 8 | - opened 9 | - reopened 10 | - synchronize 11 | - labeled 12 | - unlabeled 13 | - ready_for_review 14 | 15 | concurrency: 16 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 17 | cancel-in-progress: true 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | strategy: 23 | fail-fast: true 24 | steps: 25 | - uses: actions/checkout@v4 26 | with: 27 | submodules: true 28 | - uses: actions/setup-python@v5 29 | with: 30 | python-version: '3.10' 31 | - name: Build dependencies 32 | run: | 33 | # build pomdp-solve 34 | sudo apt-get update 35 | sudo apt-get install -y autoconf automake libtool 36 | commit_hash=4f5d399f260f7789bc1d95baab069eef5c93aaf9 37 | git clone https://github.com/cassandra/pomdp-solve.git thirdparty/pomdp-solve 38 | cd thirdparty/pomdp-solve && git checkout $commit_hash 39 | ./configure 40 | make 41 | - name: Install dependencies 42 | run: | 43 | python -m pip install --upgrade pip 44 | pip install -e . 45 | - name: Test 46 | working-directory: . 47 | run: | 48 | export POMDP_SOLVE_PATH=./thirdparty/pomdp-solve/src/pomdp-solve 49 | python tests/test_all.py 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .\#* 3 | \#* 4 | 5 | *.aux 6 | *.bbl 7 | *.blg 8 | *.log 9 | *.out 10 | *.pdf 11 | *.mtc* 12 | *.mtc0 13 | *.mtc1 14 | *.run.xml 15 | *.toc 16 | *.maf 17 | *-blx.bib 18 | 19 | CMakeLists.txt.user 20 | CMakeCache.txt 21 | CMakeFiles 22 | CMakeScripts 23 | Testing 24 | Makefile 25 | cmake_install.cmake 26 | install_manifest.txt 27 | compile_commands.json 28 | CTestTestfile.cmake 29 | _deps 30 | 31 | *__pycache__ 32 | 33 | *.pyc 34 | *.pyo 35 | __pycache__ 36 | *.so 37 | *.o 38 | 39 | *.egg 40 | *.egg-info 41 | .*cache*/ 42 | *venv*/ 43 | 44 | Cython/Compiler/*.c 45 | Cython/Plex/*.c 46 | Cython/Runtime/refnanny.c 47 | Cython/Tempita/*.c 48 | Cython/*.c 49 | Cython/*.html 50 | Cython/*/*.html 51 | 52 | Tools/*.elc 53 | Demos/*.html 54 | Demos/*/*.html 55 | 56 | /TEST_TMP/ 57 | /build/ 58 | /wheelhouse*/ 59 | !tests/build/ 60 | /dist/ 61 | .gitrev 62 | .coverage 63 | *.diff 64 | *.orig 65 | *.prof 66 | *.rej 67 | *.log 68 | *.dep 69 | *.swp 70 | *~ 71 | callgrind.out.* 72 | 73 | .ipynb_checkpoints 74 | docs/build 75 | 76 | tags 77 | TAGS 78 | MANIFEST 79 | 80 | .tox 81 | 82 | # Jetbrains IDE project files 83 | /.idea 84 | /*.iml 85 | 86 | 87 | # sphinx build folder 88 | _build 89 | 90 | # sphinx html generation in docs/ 91 | docs/doctrees 92 | docs/html/.buildinfo 93 | docs/_sphinx_src/changelog.rst 94 | 95 | # Compiled source # 96 | ################### 97 | *.com 98 | *.class 99 | *.dll 100 | *.exe 101 | *.o 102 | *.so 103 | 104 | # Packages # 105 | ############ 106 | # it's better to unpack these files and commit the raw source 107 | # git has its own built in compression methods 108 | *.7z 109 | *.dmg 110 | *.gz 111 | *.iso 112 | *.jar 113 | *.rar 114 | *.tar 115 | *.zip 116 | 117 | # Logs and databases # 118 | ###################### 119 | *.log 120 | *.sql 121 | *.sqlite 122 | 123 | # OS generated files # 124 | ###################### 125 | .DS_Store? 126 | ehthumbs.db 127 | Icon? 128 | Thumbs.db 129 | 130 | # Editor backup files # 131 | ####################### 132 | 133 | # pomdp-solve generated files 134 | ############################# 135 | *.alpha 136 | *.pg 137 | 138 | .DS_Store 139 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | exclude: '^tests/appl.patch$' 2 | 3 | fail_fast: false 4 | repos: 5 | - repo: https://github.com/pre-commit/pre-commit-hooks 6 | rev: v4.5.0 7 | hooks: 8 | - id: check-yaml 9 | exclude: "docs" 10 | - id: end-of-file-fixer 11 | exclude: "docs" 12 | - id: trailing-whitespace 13 | exclude: "docs" 14 | 15 | - repo: https://github.com/psf/black 16 | rev: 23.10.0 17 | hooks: 18 | - id: black 19 | args: [ '--config', 'pyproject.toml' ] 20 | verbose: true 21 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM continuumio/miniconda3 2 | 3 | WORKDIR /app 4 | 5 | RUN apt-get update -y 6 | # RUN apt-get install gcc g++ cmake vim -y 7 | RUN apt-get install -y build-essential 8 | 9 | RUN conda create -n pomdp python=3.8 -y 10 | 11 | # Make RUN commands use the new environment: 12 | SHELL ["conda", "run", "-n", "pomdp", "/bin/bash", "-c"] 13 | 14 | RUN pip install Cython 15 | RUN git clone https://github.com/h2r/pomdp-py.git 16 | RUN cd pomdp-py/ && pip install -e. 17 | WORKDIR /app/pomdp-py 18 | 19 | # activate 'pomdp' environment by default 20 | RUN echo "conda activate pomdp" >> ~/.bashrc 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2020 Kaiyu Zheng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include ./pomdp_py/representations/distribution/particles.pxd 2 | include ./pomdp_py/representations/distribution/histogram.pxd 3 | include ./pomdp_py/representations/distribution/gaussian.pxd 4 | include ./pomdp_py/representations/belief/particles.pxd 5 | include ./pomdp_py/utils/cython_utils.pxd 6 | include ./pomdp_py/framework/oopomdp.pxd 7 | include ./pomdp_py/framework/planner.pxd 8 | include ./pomdp_py/framework/basics.pxd 9 | include ./pomdp_py/algorithms/po_rollout.pxd 10 | include ./pomdp_py/algorithms/pomcp.pxd 11 | include ./pomdp_py/algorithms/po_uct.pxd 12 | include ./pomdp_py/algorithms/value_iteration.pxd 13 | include ./pomdp_py/problems/rocksample/cythonize/rocksample_problem.pyx 14 | include ./pomdp_py/problems/tiger/cythonize/tiger_problem.pyx 15 | include ./pomdp_py/representations/distribution/histogram.pyx 16 | include ./pomdp_py/representations/distribution/gaussian.pyx 17 | include ./pomdp_py/representations/distribution/particles.pyx 18 | include ./pomdp_py/representations/belief/particles.pyx 19 | include ./pomdp_py/utils/cython_utils.pyx 20 | include ./pomdp_py/framework/planner.pyx 21 | include ./pomdp_py/framework/basics.pyx 22 | include ./pomdp_py/framework/oopomdp.pyx 23 | include ./pomdp_py/algorithms/po_rollout.pyx 24 | include ./pomdp_py/algorithms/value_iteration.pyx 25 | include ./pomdp_py/algorithms/pomcp.pyx 26 | include ./pomdp_py/algorithms/po_uct.pyx 27 | include ./thirdparty/pomdp-solve/src/pomdp-solve 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | clean: 2 | rm -rf build/ 3 | 4 | .PHONY: build 5 | build: 6 | python setup.py build_ext --inplace 7 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | pomdp_py 2 | ======== 3 | 4 | `pomdp_py `_ is a framework to build and solve POMDP problems, written in Python and Cython. 5 | 6 | **Why pomdp_py?** It provides a POMDP framework in Python with clean and intuitive interfaces. This makes POMDP-related research or projects accessible to more people. It also helps sharing code and developing a community. 7 | 8 | Please refer to the `full documentation `_ and `installation instructions `_. 9 | 10 | If you find this library helpful to your work, please cite the `following paper `_:: 11 | 12 | @inproceedings{zheng2020pomdp_py, 13 | title = {pomdp\_py: A Framework to Build and Solve POMDP Problems}, 14 | author = {Zheng, Kaiyu and Tellex, Stefanie}, 15 | booktitle = {ICAPS 2020 Workshop on Planning and Robotics (PlanRob)}, 16 | year = {2020}, 17 | url = {https://icaps20subpages.icaps-conference.org/wp-content/uploads/2020/10/14-PlanRob_2020_paper_3.pdf}, 18 | note = {Arxiv link: "\url{https://arxiv.org/pdf/2004.10099.pdf}"} 19 | } 20 | 21 | 22 | **Call for Contributions**: please check out - `h2r/pomdp-py/issues/25 `_. 23 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_sphinx_src/api/modules.rst: -------------------------------------------------------------------------------- 1 | pomdp_py 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | pomdp_py 8 | pomdp_py.problems 9 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.algorithms.bsp.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms.bsp package 2 | ================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.algorithms.bsp.blqr module 8 | ------------------------------------ 9 | 10 | .. automodule:: pomdp_py.algorithms.bsp.blqr 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.algorithms.bsp 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.algorithms.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms package 2 | ============================ 3 | 4 | Existing POMDP Solvers: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.algorithms.po_rollout.PORollout 10 | ~pomdp_py.algorithms.po_uct.POUCT 11 | ~pomdp_py.algorithms.pomcp.POMCP 12 | ~pomdp_py.algorithms.value_iteration.ValueIteration 13 | 14 | Solvers under development (**contribution wanted**): 15 | 16 | .. autosummary:: 17 | :nosignatures: 18 | 19 | ~pomdp_py.algorithms.bsp.blqr 20 | 21 | 22 | 23 | pomdp\_py.algorithms.po\_rollout module 24 | --------------------------------------- 25 | 26 | .. automodule:: pomdp_py.algorithms.po_rollout 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.algorithms.po\_uct module 32 | ----------------------------------- 33 | 34 | .. automodule:: pomdp_py.algorithms.po_uct 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | 40 | pomdp\_py.algorithms.pomcp module 41 | --------------------------------- 42 | 43 | .. automodule:: pomdp_py.algorithms.pomcp 44 | :members: 45 | :undoc-members: 46 | :show-inheritance: 47 | 48 | pomdp\_py.algorithms.value\_iteration module 49 | -------------------------------------------- 50 | 51 | .. automodule:: pomdp_py.algorithms.value_iteration 52 | :members: 53 | :undoc-members: 54 | :show-inheritance: 55 | 56 | 57 | pomdp\_py.algorithms.bsp.blqr module 58 | ------------------------------------ 59 | 60 | .. automodule:: pomdp_py.algorithms.bsp.blqr 61 | :members: 62 | :undoc-members: 63 | :show-inheritance: 64 | 65 | 66 | pomdp\_py.algorithms.visual.visual module 67 | ----------------------------------------- 68 | 69 | .. automodule:: pomdp_py.algorithms.visual.visual 70 | :members: 71 | :undoc-members: 72 | :show-inheritance: 73 | 74 | 75 | .. bibliography:: ../refs.bib 76 | :filter: docname in docnames 77 | :style: unsrt 78 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.algorithms.visual.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms.visual package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.algorithms.visual.visual module 8 | ----------------------------------------- 9 | 10 | .. automodule:: pomdp_py.algorithms.visual.visual 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.algorithms.visual 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.framework.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.framework package 2 | =========================== 3 | 4 | Important classes in :py:mod:`pomdp_py.framework.basics`: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.framework.basics.Distribution 10 | ~pomdp_py.framework.basics.GenerativeDistribution 11 | ~pomdp_py.framework.basics.TransitionModel 12 | ~pomdp_py.framework.basics.ObservationModel 13 | ~pomdp_py.framework.basics.BlackboxModel 14 | ~pomdp_py.framework.basics.RewardModel 15 | ~pomdp_py.framework.basics.PolicyModel 16 | ~pomdp_py.framework.basics.Agent 17 | ~pomdp_py.framework.basics.Environment 18 | ~pomdp_py.framework.basics.POMDP 19 | ~pomdp_py.framework.basics.State 20 | ~pomdp_py.framework.basics.Action 21 | ~pomdp_py.framework.basics.Observation 22 | ~pomdp_py.framework.basics.Option 23 | 24 | 25 | 26 | pomdp\_py.framework.basics module 27 | --------------------------------- 28 | 29 | .. automodule:: pomdp_py.framework.basics 30 | :members: 31 | :show-inheritance: 32 | :special-members: __getitem__, __setitem__ 33 | 34 | pomdp\_py.framework.oopomdp module 35 | ---------------------------------- 36 | 37 | .. automodule:: pomdp_py.framework.oopomdp 38 | :members: 39 | :show-inheritance: 40 | :special-members: __getitem__, __setitem__ 41 | 42 | pomdp\_py.framework.planner module 43 | ---------------------------------- 44 | 45 | .. automodule:: pomdp_py.framework.planner 46 | :members: 47 | :show-inheritance: 48 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.light_dark.agent.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.agent package 2 | ============================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.agent.belief module 8 | -------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.agent.belief 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.light_dark.domain.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.domain package 2 | ============================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.domain.action module 8 | --------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.domain.observation module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.light\_dark.domain.state module 24 | -------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.light_dark.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.light_dark.env.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.env package 2 | ========================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.env.env module 8 | --------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.env.plotting module 16 | -------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.env.plotting 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.light\_dark.env.visual module 24 | ------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.env.visual 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.light_dark.env 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.light_dark.models.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.models package 2 | ============================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.models.observation\_model module 8 | --------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.models.observation_model 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.models.transition\_model module 16 | -------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.models.transition_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.models 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.light_dark.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark package 2 | ====================================== 3 | 4 | .. include:: ../../../pomdp_py/problems/light_dark/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.light_dark.agent 13 | pomdp_py.problems.light_dark.domain 14 | pomdp_py.problems.light_dark.env 15 | pomdp_py.problems.light_dark.models 16 | 17 | Submodules 18 | ---------- 19 | 20 | pomdp\_py.problems.light\_dark.problem\_discrete module 21 | ------------------------------------------------------- 22 | 23 | .. automodule:: pomdp_py.problems.light_dark.problem_discrete 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | pomdp\_py.problems.light\_dark.test module 29 | ------------------------------------------ 30 | 31 | .. automodule:: pomdp_py.problems.light_dark.test 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Module contents 37 | --------------- 38 | 39 | .. automodule:: pomdp_py.problems.light_dark 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.load_unload.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.load\_unload package 2 | ======================================= 3 | 4 | .. include:: ../../../pomdp_py/problems/load_unload/README.rst 5 | 6 | Submodules 7 | ---------- 8 | 9 | pomdp\_py.problems.load\_unload.load\_unload module 10 | --------------------------------------------------- 11 | 12 | .. automodule:: pomdp_py.problems.load_unload.load_unload 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | Module contents 18 | --------------- 19 | 20 | .. automodule:: pomdp_py.problems.load_unload 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.maze.domain.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.domain package 2 | ====================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.domain.action module 8 | -------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.maze.domain.observation module 16 | ------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.maze.domain.state module 24 | ------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.maze.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.maze.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.maze.env.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.env package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.env.env module 8 | -------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.env 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.maze.models.components.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.models.components package 2 | ================================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.models.components.map module 8 | ---------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.models.components.map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.models.components 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.maze.models.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.models package 2 | ====================================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.maze.models.components 11 | 12 | Module contents 13 | --------------- 14 | 15 | .. automodule:: pomdp_py.problems.maze.models 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.maze.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze package 2 | =============================== 3 | 4 | .. include:: ../../../pomdp_py/problems/maze/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.maze.domain 13 | pomdp_py.problems.maze.env 14 | pomdp_py.problems.maze.models 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.problems.maze 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.agent.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.agent package 2 | ====================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.agent.agent module 8 | ----------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.agent.belief module 16 | ------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.agent.belief 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.agent 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.domain.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.domain package 2 | ======================================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.domain.action module 8 | ------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.domain.observation module 16 | ------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.multi\_object\_search.domain.state module 24 | ------------------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.multi_object_search.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.env.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.env package 2 | ==================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.env.env module 8 | ------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.env.visual module 16 | ---------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.models.components.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.models.components package 2 | ================================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.models.components.grid\_map module 8 | --------------------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.models.components.sensor module 16 | ------------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.models.components.sensor 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.models.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.models package 2 | ======================================================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.multi_object_search.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | pomdp\_py.problems.multi\_object\_search.models.observation\_model module 16 | ------------------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.multi\_object\_search.models.policy\_model module 24 | -------------------------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.multi\_object\_search.models.reward\_model module 32 | -------------------------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.multi_object_search.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.multi\_object\_search.models.transition\_model module 40 | ------------------------------------------------------------------------ 41 | 42 | .. automodule:: pomdp_py.problems.multi_object_search.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.multi_object_search.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.multi_object_search.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search package 2 | ================================================ 3 | 4 | .. include:: ../../../pomdp_py/problems/multi_object_search/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.multi_object_search.agent 13 | pomdp_py.problems.multi_object_search.domain 14 | pomdp_py.problems.multi_object_search.env 15 | pomdp_py.problems.multi_object_search.models 16 | 17 | Submodules 18 | ---------- 19 | 20 | pomdp\_py.problems.multi\_object\_search.example\_worlds module 21 | --------------------------------------------------------------- 22 | 23 | .. automodule:: pomdp_py.problems.multi_object_search.example_worlds 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | pomdp\_py.problems.multi\_object\_search.problem module 29 | ------------------------------------------------------- 30 | 31 | .. automodule:: pomdp_py.problems.multi_object_search.problem 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Module contents 37 | --------------- 38 | 39 | .. automodule:: pomdp_py.problems.multi_object_search 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.rocksample.cythonize.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.rocksample.cythonize package 2 | =============================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 8 | ------------------------------------------------------------------ 9 | 10 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 16 | ------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 24 | ------------------------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 32 | ------------------------------------------------------------------ 33 | 34 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.rocksample.cythonize.run\_rocksample module 40 | -------------------------------------------------------------- 41 | 42 | .. automodule:: pomdp_py.problems.rocksample.cythonize.run_rocksample 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.rocksample.cythonize 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.rocksample.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.rocksample package 2 | ===================================== 3 | 4 | .. include:: ../../../pomdp_py/problems/rocksample/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.rocksample.cythonize 13 | 14 | Submodules 15 | ---------- 16 | 17 | pomdp\_py.problems.rocksample.cythonize module 18 | ---------------------------------------------- 19 | 20 | .. automodule:: pomdp_py.problems.rocksample.cythonize 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | pomdp\_py.problems.rocksample.rocksample\_problem module 26 | -------------------------------------------------------- 27 | 28 | .. automodule:: pomdp_py.problems.rocksample.rocksample_problem 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | Module contents 34 | --------------- 35 | 36 | .. automodule:: pomdp_py.problems.rocksample 37 | :members: 38 | :undoc-members: 39 | :show-inheritance: 40 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems package 2 | ========================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.lasertag 11 | pomdp_py.problems.light_dark 12 | pomdp_py.problems.load_unload 13 | pomdp_py.problems.maze 14 | pomdp_py.problems.multi_object_search 15 | pomdp_py.problems.rocksample 16 | pomdp_py.problems.tag 17 | pomdp_py.problems.tiger 18 | 19 | Module contents 20 | --------------- 21 | 22 | .. automodule:: pomdp_py.problems 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.agent.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.agent package 2 | ==================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.agent.agent module 8 | ----------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.domain.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.domain package 2 | ===================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.domain.action module 8 | ------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.domain.observation module 16 | ------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.tag.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tag.domain.state module 24 | ------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.tag.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.tag.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.env.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.env package 2 | ================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.env.env module 8 | ------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.env.visual module 16 | ---------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.models.components.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.models.components package 2 | ================================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.models.components.grid\_map module 8 | --------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.models.components.motion\_policy module 16 | -------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.models.components.motion_policy 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.models.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.models package 2 | ===================================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.tag.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | pomdp\_py.problems.tag.models.observation\_model module 16 | ------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tag.models.policy\_model module 24 | -------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.tag.models.reward\_model module 32 | -------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.tag.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.tag.models.transition\_model module 40 | ------------------------------------------------------ 41 | 42 | .. automodule:: pomdp_py.problems.tag.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.tag.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tag.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag package 2 | ============================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.tag.agent 11 | pomdp_py.problems.tag.domain 12 | pomdp_py.problems.tag.env 13 | pomdp_py.problems.tag.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | pomdp\_py.problems.tag.constants module 19 | --------------------------------------- 20 | 21 | .. automodule:: pomdp_py.problems.tag.constants 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | pomdp\_py.problems.tag.example\_worlds module 27 | --------------------------------------------- 28 | 29 | .. automodule:: pomdp_py.problems.tag.example_worlds 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | pomdp\_py.problems.tag.experiment module 35 | ---------------------------------------- 36 | 37 | .. automodule:: pomdp_py.problems.tag.experiment 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | pomdp\_py.problems.tag.problem module 43 | ------------------------------------- 44 | 45 | .. automodule:: pomdp_py.problems.tag.problem 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | 50 | Module contents 51 | --------------- 52 | 53 | .. automodule:: pomdp_py.problems.tag 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tiger.cythonize.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tiger.cythonize package 2 | ========================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tiger.cythonize.run\_tiger module 8 | ---------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tiger.cythonize.run_tiger 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 24 | -------------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 32 | -------------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 40 | -------------------------------------------------------- 41 | 42 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.tiger.cythonize 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.problems.tiger.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tiger package 2 | ================================ 3 | 4 | .. include:: ../../../pomdp_py/problems/tiger/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.tiger.cythonize 13 | 14 | Submodules 15 | ---------- 16 | 17 | pomdp\_py.problems.tiger.cythonize module 18 | ----------------------------------------- 19 | 20 | .. automodule:: pomdp_py.problems.tiger.cythonize 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | pomdp\_py.problems.tiger.tiger\_problem module 26 | ---------------------------------------------- 27 | 28 | .. automodule:: pomdp_py.problems.tiger.tiger_problem 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | Module contents 34 | --------------- 35 | 36 | .. automodule:: pomdp_py.problems.tiger 37 | :members: 38 | :undoc-members: 39 | :show-inheritance: 40 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.representations.belief.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations.belief package 2 | ======================================== 3 | 4 | pomdp\_py.representations.belief.histogram module 5 | ------------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.representations.belief.histogram 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | pomdp\_py.representations.belief.particles module 13 | ------------------------------------------------- 14 | 15 | .. automodule:: pomdp_py.representations.belief.particles 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.representations.distribution.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations.distribution package 2 | ============================================== 3 | 4 | pomdp\_py.representations.distribution.histogram module 5 | ------------------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.representations.distribution.histogram 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | :special-members: __getitem__, __setitem__ 12 | 13 | pomdp\_py.representations.distribution.particles module 14 | ------------------------------------------------------- 15 | 16 | .. automodule:: pomdp_py.representations.distribution.particles 17 | :members: 18 | :undoc-members: 19 | :special-members: __getitem__, __setitem__ 20 | 21 | pomdp\_py.representations.distribution.gaussian module 22 | ------------------------------------------------------- 23 | 24 | .. automodule:: pomdp_py.representations.distribution.gaussian 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | :special-members: __getitem__, __setitem__ 29 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.representations.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations package 2 | ================================= 3 | 4 | .. toctree:: 5 | 6 | pomdp_py.representations.belief 7 | pomdp_py.representations.distribution 8 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py package 2 | ================= 3 | 4 | .. toctree:: 5 | 6 | pomdp_py.algorithms 7 | pomdp_py.framework 8 | pomdp_py.representations 9 | pomdp_py.utils 10 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.utils.debugging.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.utils.debugging module 2 | ================================ 3 | 4 | .. automodule:: pomdp_py.utils.debugging 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.utils.interfaces.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.utils.interfaces package 2 | ================================== 3 | 4 | pomdp\_py.utils.interfaces.simple\_rl module 5 | -------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.utils.interfaces.simple_rl 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/pomdp_py.visual.rst: -------------------------------------------------------------------------------- 1 | pomdp\_py.visual package 2 | ======================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.visual.search\_tree module 8 | ------------------------------------ 9 | 10 | .. automodule:: pomdp_py.visual.search_tree 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.visual 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/_sphinx_src/api/refs.bib: -------------------------------------------------------------------------------- 1 | @inproceedings{silver2010monte, 2 | title={Monte-Carlo planning in large POMDPs}, 3 | author={Silver, David and Veness, Joel}, 4 | booktitle={Advances in neural information processing systems}, 5 | pages={2164--2172}, 6 | year={2010} 7 | } 8 | 9 | @article{kearns2002sparse, 10 | title={A sparse sampling algorithm for near-optimal planning in large Markov decision processes}, 11 | author={Kearns, Michael and Mansour, Yishay and Ng, Andrew Y}, 12 | journal={Machine learning}, 13 | volume={49}, 14 | number={2-3}, 15 | pages={193--208}, 16 | year={2002}, 17 | publisher={Springer} 18 | } 19 | 20 | @article{lim2019sparse, 21 | title={Sparse tree search optimality guarantees in POMDPs with continuous observation spaces}, 22 | author={Lim, Michael H and Tomlin, Claire J and Sunberg, Zachary N}, 23 | journal={arXiv preprint arXiv:1910.04332}, 24 | year={2019} 25 | } 26 | 27 | @inproceedings{gusmao2012towards, 28 | title={Towards Generalizing the Success of Monte-Carlo Tree Search beyond the Game of Go.}, 29 | author={Gusmao, Ant{\'o}nio and Raiko, Tapani}, 30 | booktitle={ECAI}, 31 | pages={384--389}, 32 | year={2012} 33 | } -------------------------------------------------------------------------------- /docs/_sphinx_src/changelog.rst: -------------------------------------------------------------------------------- 1 | ../../CHANGELOG.rst -------------------------------------------------------------------------------- /docs/_sphinx_src/design_principles.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | Design Principles 4 | ***************** 5 | 6 | 7 | 1. Distributions are the fundamental building blocks of a POMDP. 8 | 9 | Essentially, a POMDP describes the interaction between an `agent` and the 10 | `environment`. The interaction is formally encapsulated by a few important 11 | `generative probability distributions`. The core of pomdp_py is built around 12 | this understanding. The interfaces in :py:mod:`pomdp_py.framework.basics` 13 | convey this idea. Using distributions as the building block avoids the 14 | requirement of explicitly enumerating over :math:`S,A,O`. 15 | 16 | -- 17 | 18 | 2. POMDP = agent + environment 19 | 20 | Like above, the gist of a POMDP is captured by the generative probability 21 | distributions including the 22 | :class:`~pomdp_py.framework.basics.TransitionModel`, 23 | :class:`~pomdp_py.framework.basics.ObservationModel`, 24 | :class:`~pomdp_py.framework.basics.RewardModel`. Because, generally, :math:`T, R, O` 25 | may be different for the agent versus the environment (to support learning), 26 | it does not make much sense to have the POMDP class to hold this information; 27 | instead, Agent should have its own :math:`T, R, O, \pi` and the Environment should 28 | have its own :math:`T, R`. The job of a POMDP is only to verify whether a given 29 | state, action, or observation are valid. See :class:`~pomdp_py.framework.basics.Agent` 30 | and :class:`~pomdp_py.framework.basics.Environment`. 31 | 32 | 33 | .. figure:: pomdp.jpg 34 | :alt: POMDP diagram 35 | 36 | A Diagram for POMDP :math:`\langle S,A,\Omega,T,O,R \rangle`. (**correction**: 37 | change :math:`o\in S` to :math:`o\in\Omega`) 38 | 39 | -------------------------------------------------------------------------------- /docs/_sphinx_src/examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | In this document, we discuss some examples of using `pomdp_py` to define POMDP problems and solve them using :doc:`existing_solvers`. We will go over two examples: the simpler Tiger problem, and the more complicated but interesting Multi-Object Search (MOS) problem. The former represents how one could quickly implement a simple POMDP, and the latter represents how one may structure their project (as a convention) when using `pomdp_py` for more complicated domains. 5 | 6 | 7 | Tiger 8 | ***** 9 | 10 | This example describes how one could quickly implement a simple POMDP. 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | examples.tiger 16 | 17 | Multi-Object Search (MOS) 18 | ************************* 19 | 20 | This example describes the convention of how one structures their project when using `pomdp_py` for more complicated domains. 21 | 22 | .. toctree:: 23 | :maxdepth: 1 24 | 25 | examples.mos 26 | -------------------------------------------------------------------------------- /docs/_sphinx_src/existing_domains.rst: -------------------------------------------------------------------------------- 1 | Existing POMDP Domains 2 | ====================== 3 | 4 | Several domains have been implemented: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | pomdp_py.problems.multi_object_search.problem 10 | pomdp_py.problems.tiger.tiger_problem 11 | pomdp_py.problems.rocksample.rocksample_problem 12 | pomdp_py.problems.tag 13 | pomdp_py.problems.load_unload 14 | 15 | Some problems that we hope to implement are below. There are even more examples `here `_. Contribution is welcomed. 16 | 17 | * :doc:`problems/pomdp_py.problems.light_dark` 18 | * :doc:`problems/pomdp_py.problems.maze` 19 | 20 | 21 | In addition, the interfaces in `pomdp_py` are general enough to be extended to e.g. learning, multi-agent POMDPs; see :doc:`extensions`. `Contributions are always welcomed!` 22 | -------------------------------------------------------------------------------- /docs/_sphinx_src/existing_solvers.rst: -------------------------------------------------------------------------------- 1 | Existing POMDP Solvers 2 | ====================== 3 | 4 | The library currently contains an implementation of `POMCP`, `POUCT`, and basic `ValueIteration`. 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.algorithms.po_rollout 10 | ~pomdp_py.algorithms.po_uct 11 | ~pomdp_py.algorithms.pomcp 12 | ~pomdp_py.algorithms.value_iteration.ValueIteration 13 | 14 | 15 | The library also currently interfaces with `pomdp-solve `_, developed by Anthony R. Cassandra, and `sarsop `_, developed by NUS. See :doc:`examples.external_solvers` for details and examples. 16 | 17 | .. autosummary:: 18 | :nosignatures: 19 | 20 | ~pomdp_py.utils.interfaces.solvers.sarsop 21 | ~pomdp_py.utils.interfaces.solvers.vi_pruning 22 | 23 | .. note:: 24 | 25 | A pomdp_py :py:mod:`~pomdp_py.framework.basics.Agent` with enumerable state :math:`S`, action :math:`A`, and observation spaces :math:`\Omega`, with explicitly defined probability for its models (:math:`T,O,R`) can be directly used as input to the above functions that interface with the solvers' binaries programs. 26 | -------------------------------------------------------------------------------- /docs/_sphinx_src/extensions.rst: -------------------------------------------------------------------------------- 1 | Use Case Extensions 2 | =================== 3 | 4 | The interfaces provided by pomdp_py should support projects in these directions (and more): 5 | 6 | 1. POMDP for RL (Reinforcement Learning) 7 | 8 | - Learn a :class:`~pomdp_py.framework.basics.PolicyModel` (model-free) 9 | 10 | - Learn a :class:`~pomdp_py.framework.basics.TransitionModel` and 11 | :class:`~pomdp_py.framework.basics.ObservationModel` (model-based) 12 | 13 | 2. Multi-Agent POMDPs 14 | 15 | - Define multiple :class:`~pomdp_py.framework.basics.Agent` classes. 16 | 17 | 3. Object-Oriented POMDPs 18 | 19 | - The Object-Oriented POMDP (OO-POMDP) already has its interfaces implemented 20 | in :py:mod:`~pomdp_py.framework.oopomdp`. 21 | 22 | 3. Task Transfer or Transfer Learning 23 | 24 | - Define multiple :class:`~pomdp_py.framework.basics.Agent` classes. 25 | 26 | 3. Planning Algorithm Research 27 | 28 | - Use existing POMCP or POUCT as baslines. 29 | -------------------------------------------------------------------------------- /docs/_sphinx_src/images/bigai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/bigai.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/brown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/brown.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/brown_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/brown_logo.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/favicon.ico -------------------------------------------------------------------------------- /docs/_sphinx_src/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/logo.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/mos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/mos.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/mos_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/mos_window.png -------------------------------------------------------------------------------- /docs/_sphinx_src/images/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/images/tree.png -------------------------------------------------------------------------------- /docs/_sphinx_src/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=.. 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/_sphinx_src/modules.rst: -------------------------------------------------------------------------------- 1 | docs 2 | ==== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | -------------------------------------------------------------------------------- /docs/_sphinx_src/pomdp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/pomdp.jpg -------------------------------------------------------------------------------- /docs/_sphinx_src/static/custom.css: -------------------------------------------------------------------------------- 1 | div.sphinxsidebar { 2 | max-height: 100%; 3 | overflow-y: auto; 4 | } 5 | 6 | h2 a.toc-backref, h3 a.toc-backref { 7 | color: #000; 8 | text-decoration: none; 9 | } 10 | 11 | .contents.local.topic a { 12 | color: #330000 13 | } 14 | 15 | /* Scrollbar */ 16 | html { 17 | --scrollbarBG: #EFEFEF; 18 | --thumbBG: #CDCDCD;b 19 | } 20 | body::-webkit-scrollbar { 21 | width: 14px; 22 | } 23 | body { 24 | scrollbar-width: thin; 25 | scrollbar-color: var(--thumbBG) var(--scrollbarBG); 26 | } 27 | body::-webkit-scrollbar-track { 28 | background: var(--scrollbarBG); 29 | } 30 | body::-webkit-scrollbar-thumb { 31 | background-color: var(--thumbBG) ; 32 | border-radius: 6px; 33 | border: 3px solid var(--scrollbarBG); 34 | } 35 | 36 | div.sphinxsidebar::-webkit-scrollbar { 37 | width: 11px; 38 | } 39 | div.sphinxsidebar { 40 | scrollbar-width: thin; 41 | scrollbar-color: var(--thumbBG) var(--scrollbarBG); 42 | } 43 | div.sphinxsidebar::-webkit-scrollbar-track { 44 | background: var(--scrollbarBG); 45 | } 46 | div.sphinxsidebar::-webkit-scrollbar-thumb { 47 | background-color: var(--thumbBG) ; 48 | border-radius: 6px; 49 | border: 3px solid var(--scrollbarBG); 50 | } 51 | 52 | ul.simple li p { 53 | margin-bottom: 0px; 54 | } 55 | -------------------------------------------------------------------------------- /docs/_sphinx_src/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/_sphinx_src/static/logo.png -------------------------------------------------------------------------------- /docs/html/_images/brown_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_images/brown_logo.png -------------------------------------------------------------------------------- /docs/html/_images/mos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_images/mos.png -------------------------------------------------------------------------------- /docs/html/_images/mos_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_images/mos_window.png -------------------------------------------------------------------------------- /docs/html/_images/pomdp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_images/pomdp.jpg -------------------------------------------------------------------------------- /docs/html/_sources/api/modules.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp_py 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | pomdp_py 8 | pomdp_py.problems 9 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.algorithms.bsp.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms.bsp package 2 | ================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.algorithms.bsp.blqr module 8 | ------------------------------------ 9 | 10 | .. automodule:: pomdp_py.algorithms.bsp.blqr 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.algorithms.bsp 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.algorithms.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms package 2 | ============================ 3 | 4 | Existing POMDP Solvers: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.algorithms.po_rollout.PORollout 10 | ~pomdp_py.algorithms.po_uct.POUCT 11 | ~pomdp_py.algorithms.pomcp.POMCP 12 | ~pomdp_py.algorithms.value_iteration.ValueIteration 13 | 14 | Solvers under development (**contribution wanted**): 15 | 16 | .. autosummary:: 17 | :nosignatures: 18 | 19 | ~pomdp_py.algorithms.bsp.blqr 20 | 21 | 22 | 23 | pomdp\_py.algorithms.po\_rollout module 24 | --------------------------------------- 25 | 26 | .. automodule:: pomdp_py.algorithms.po_rollout 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.algorithms.po\_uct module 32 | ----------------------------------- 33 | 34 | .. automodule:: pomdp_py.algorithms.po_uct 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | 40 | pomdp\_py.algorithms.pomcp module 41 | --------------------------------- 42 | 43 | .. automodule:: pomdp_py.algorithms.pomcp 44 | :members: 45 | :undoc-members: 46 | :show-inheritance: 47 | 48 | pomdp\_py.algorithms.value\_iteration module 49 | -------------------------------------------- 50 | 51 | .. automodule:: pomdp_py.algorithms.value_iteration 52 | :members: 53 | :undoc-members: 54 | :show-inheritance: 55 | 56 | 57 | pomdp\_py.algorithms.bsp.blqr module 58 | ------------------------------------ 59 | 60 | .. automodule:: pomdp_py.algorithms.bsp.blqr 61 | :members: 62 | :undoc-members: 63 | :show-inheritance: 64 | 65 | 66 | pomdp\_py.algorithms.visual.visual module 67 | ----------------------------------------- 68 | 69 | .. automodule:: pomdp_py.algorithms.visual.visual 70 | :members: 71 | :undoc-members: 72 | :show-inheritance: 73 | 74 | 75 | .. bibliography:: ../refs.bib 76 | :filter: docname in docnames 77 | :style: unsrt 78 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.algorithms.visual.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.algorithms.visual package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.algorithms.visual.visual module 8 | ----------------------------------------- 9 | 10 | .. automodule:: pomdp_py.algorithms.visual.visual 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.algorithms.visual 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.framework.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.framework package 2 | =========================== 3 | 4 | Important classes in :py:mod:`pomdp_py.framework.basics`: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.framework.basics.Distribution 10 | ~pomdp_py.framework.basics.GenerativeDistribution 11 | ~pomdp_py.framework.basics.TransitionModel 12 | ~pomdp_py.framework.basics.ObservationModel 13 | ~pomdp_py.framework.basics.BlackboxModel 14 | ~pomdp_py.framework.basics.RewardModel 15 | ~pomdp_py.framework.basics.PolicyModel 16 | ~pomdp_py.framework.basics.Agent 17 | ~pomdp_py.framework.basics.Environment 18 | ~pomdp_py.framework.basics.POMDP 19 | ~pomdp_py.framework.basics.State 20 | ~pomdp_py.framework.basics.Action 21 | ~pomdp_py.framework.basics.Observation 22 | ~pomdp_py.framework.basics.Option 23 | 24 | 25 | 26 | pomdp\_py.framework.basics module 27 | --------------------------------- 28 | 29 | .. automodule:: pomdp_py.framework.basics 30 | :members: 31 | :show-inheritance: 32 | :special-members: __getitem__, __setitem__ 33 | 34 | pomdp\_py.framework.oopomdp module 35 | ---------------------------------- 36 | 37 | .. automodule:: pomdp_py.framework.oopomdp 38 | :members: 39 | :show-inheritance: 40 | :special-members: __getitem__, __setitem__ 41 | 42 | pomdp\_py.framework.planner module 43 | ---------------------------------- 44 | 45 | .. automodule:: pomdp_py.framework.planner 46 | :members: 47 | :show-inheritance: 48 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.lasertag.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.lasertag package 2 | =================================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: pomdp_py.problems.lasertag 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.light_dark.agent.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.agent package 2 | ============================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.agent.belief module 8 | -------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.agent.belief 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.light_dark.domain.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.domain package 2 | ============================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.domain.action module 8 | --------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.domain.observation module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.light\_dark.domain.state module 24 | -------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.light_dark.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.light_dark.env.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.env package 2 | ========================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.env.env module 8 | --------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.env.plotting module 16 | -------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.env.plotting 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.light\_dark.env.visual module 24 | ------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.env.visual 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.light_dark.env 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.light_dark.models.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark.models package 2 | ============================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.light\_dark.models.observation\_model module 8 | --------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.light_dark.models.observation_model 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.light\_dark.models.transition\_model module 16 | -------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.light_dark.models.transition_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.light_dark.models 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.light_dark.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.light\_dark package 2 | ====================================== 3 | 4 | .. include:: ../../../pomdp_py/problems/light_dark/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.light_dark.agent 13 | pomdp_py.problems.light_dark.domain 14 | pomdp_py.problems.light_dark.env 15 | pomdp_py.problems.light_dark.models 16 | 17 | Submodules 18 | ---------- 19 | 20 | pomdp\_py.problems.light\_dark.problem\_discrete module 21 | ------------------------------------------------------- 22 | 23 | .. automodule:: pomdp_py.problems.light_dark.problem_discrete 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | pomdp\_py.problems.light\_dark.test module 29 | ------------------------------------------ 30 | 31 | .. automodule:: pomdp_py.problems.light_dark.test 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Module contents 37 | --------------- 38 | 39 | .. automodule:: pomdp_py.problems.light_dark 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.load_unload.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.load\_unload package 2 | ======================================= 3 | 4 | .. include:: ../../../pomdp_py/problems/load_unload/README.rst 5 | 6 | Submodules 7 | ---------- 8 | 9 | pomdp\_py.problems.load\_unload.load\_unload module 10 | --------------------------------------------------- 11 | 12 | .. automodule:: pomdp_py.problems.load_unload.load_unload 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | Module contents 18 | --------------- 19 | 20 | .. automodule:: pomdp_py.problems.load_unload 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.maze.domain.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.domain package 2 | ====================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.domain.action module 8 | -------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.maze.domain.observation module 16 | ------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.maze.domain.state module 24 | ------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.maze.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.maze.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.maze.env.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.env package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.env.env module 8 | -------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.env 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.maze.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.models.components package 2 | ================================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.maze.models.components.map module 8 | ---------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.maze.models.components.map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.maze.models.components 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.maze.models.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze.models package 2 | ====================================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.maze.models.components 11 | 12 | Module contents 13 | --------------- 14 | 15 | .. automodule:: pomdp_py.problems.maze.models 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.maze.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.maze package 2 | =============================== 3 | 4 | .. include:: ../../../pomdp_py/problems/maze/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.maze.domain 13 | pomdp_py.problems.maze.env 14 | pomdp_py.problems.maze.models 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.problems.maze 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.agent.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.agent package 2 | ====================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.agent.agent module 8 | ----------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.agent.belief module 16 | ------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.agent.belief 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.agent 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.domain.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.domain package 2 | ======================================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.domain.action module 8 | ------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.domain.observation module 16 | ------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.multi\_object\_search.domain.state module 24 | ------------------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.multi_object_search.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.env.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.env package 2 | ==================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.env.env module 8 | ------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.env.visual module 16 | ---------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.models.components package 2 | ================================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.multi\_object\_search.models.components.grid\_map module 8 | --------------------------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.multi_object_search.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.multi\_object\_search.models.components.sensor module 16 | ------------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.models.components.sensor 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.models.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search.models package 2 | ======================================================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.multi_object_search.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | pomdp\_py.problems.multi\_object\_search.models.observation\_model module 16 | ------------------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.multi_object_search.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.multi\_object\_search.models.policy\_model module 24 | -------------------------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.multi_object_search.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.multi\_object\_search.models.reward\_model module 32 | -------------------------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.multi_object_search.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.multi\_object\_search.models.transition\_model module 40 | ------------------------------------------------------------------------ 41 | 42 | .. automodule:: pomdp_py.problems.multi_object_search.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.multi_object_search.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.multi_object_search.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.multi\_object\_search package 2 | ================================================ 3 | 4 | .. include:: ../../../pomdp_py/problems/multi_object_search/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.multi_object_search.agent 13 | pomdp_py.problems.multi_object_search.domain 14 | pomdp_py.problems.multi_object_search.env 15 | pomdp_py.problems.multi_object_search.models 16 | 17 | Submodules 18 | ---------- 19 | 20 | pomdp\_py.problems.multi\_object\_search.example\_worlds module 21 | --------------------------------------------------------------- 22 | 23 | .. automodule:: pomdp_py.problems.multi_object_search.example_worlds 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | pomdp\_py.problems.multi\_object\_search.problem module 29 | ------------------------------------------------------- 30 | 31 | .. automodule:: pomdp_py.problems.multi_object_search.problem 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | Module contents 37 | --------------- 38 | 39 | .. automodule:: pomdp_py.problems.multi_object_search 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.rocksample.cythonize.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.rocksample.cythonize package 2 | =============================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 8 | ------------------------------------------------------------------ 9 | 10 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 16 | ------------------------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 24 | ------------------------------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.rocksample.cythonize.rocksample\_problem module 32 | ------------------------------------------------------------------ 33 | 34 | .. automodule:: pomdp_py.problems.rocksample.cythonize.rocksample_problem 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.rocksample.cythonize.run\_rocksample module 40 | -------------------------------------------------------------- 41 | 42 | .. automodule:: pomdp_py.problems.rocksample.cythonize.run_rocksample 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.rocksample.cythonize 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.rocksample.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.rocksample package 2 | ===================================== 3 | 4 | .. include:: ../../../pomdp_py/problems/rocksample/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.rocksample.cythonize 13 | 14 | Submodules 15 | ---------- 16 | 17 | pomdp\_py.problems.rocksample.cythonize module 18 | ---------------------------------------------- 19 | 20 | .. automodule:: pomdp_py.problems.rocksample.cythonize 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | pomdp\_py.problems.rocksample.rocksample\_problem module 26 | -------------------------------------------------------- 27 | 28 | .. automodule:: pomdp_py.problems.rocksample.rocksample_problem 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | Module contents 34 | --------------- 35 | 36 | .. automodule:: pomdp_py.problems.rocksample 37 | :members: 38 | :undoc-members: 39 | :show-inheritance: 40 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems package 2 | ========================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.lasertag 11 | pomdp_py.problems.light_dark 12 | pomdp_py.problems.load_unload 13 | pomdp_py.problems.maze 14 | pomdp_py.problems.multi_object_search 15 | pomdp_py.problems.rocksample 16 | pomdp_py.problems.tag 17 | pomdp_py.problems.tiger 18 | 19 | Module contents 20 | --------------- 21 | 22 | .. automodule:: pomdp_py.problems 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.agent.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.agent package 2 | ==================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.agent.agent module 8 | ----------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.domain.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.domain package 2 | ===================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.domain.action module 8 | ------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.domain.observation module 16 | ------------------------------------------------ 17 | 18 | .. automodule:: pomdp_py.problems.tag.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tag.domain.state module 24 | ------------------------------------------ 25 | 26 | .. automodule:: pomdp_py.problems.tag.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: pomdp_py.problems.tag.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.env.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.env package 2 | ================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.env.env module 8 | ------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.env.visual module 16 | ---------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.models.components package 2 | ================================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tag.models.components.grid\_map module 8 | --------------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tag.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tag.models.components.motion\_policy module 16 | -------------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.models.components.motion_policy 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.models.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag.models package 2 | ===================================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.tag.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | pomdp\_py.problems.tag.models.observation\_model module 16 | ------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tag.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tag.models.policy\_model module 24 | -------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.tag.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.tag.models.reward\_model module 32 | -------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.tag.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.tag.models.transition\_model module 40 | ------------------------------------------------------ 41 | 42 | .. automodule:: pomdp_py.problems.tag.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.tag.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tag.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tag package 2 | ============================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | pomdp_py.problems.tag.agent 11 | pomdp_py.problems.tag.domain 12 | pomdp_py.problems.tag.env 13 | pomdp_py.problems.tag.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | pomdp\_py.problems.tag.constants module 19 | --------------------------------------- 20 | 21 | .. automodule:: pomdp_py.problems.tag.constants 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | pomdp\_py.problems.tag.example\_worlds module 27 | --------------------------------------------- 28 | 29 | .. automodule:: pomdp_py.problems.tag.example_worlds 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | pomdp\_py.problems.tag.experiment module 35 | ---------------------------------------- 36 | 37 | .. automodule:: pomdp_py.problems.tag.experiment 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | pomdp\_py.problems.tag.problem module 43 | ------------------------------------- 44 | 45 | .. automodule:: pomdp_py.problems.tag.problem 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | 50 | Module contents 51 | --------------- 52 | 53 | .. automodule:: pomdp_py.problems.tag 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tiger.cythonize.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tiger.cythonize package 2 | ========================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.problems.tiger.cythonize.run\_tiger module 8 | ---------------------------------------------------- 9 | 10 | .. automodule:: pomdp_py.problems.tiger.cythonize.run_tiger 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 24 | -------------------------------------------------------- 25 | 26 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 32 | -------------------------------------------------------- 33 | 34 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | pomdp\_py.problems.tiger.cythonize.tiger\_problem module 40 | -------------------------------------------------------- 41 | 42 | .. automodule:: pomdp_py.problems.tiger.cythonize.tiger_problem 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: pomdp_py.problems.tiger.cythonize 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.problems.tiger.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.problems.tiger package 2 | ================================ 3 | 4 | .. include:: ../../../pomdp_py/problems/tiger/README.rst 5 | 6 | Subpackages 7 | ----------- 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | 12 | pomdp_py.problems.tiger.cythonize 13 | 14 | Submodules 15 | ---------- 16 | 17 | pomdp\_py.problems.tiger.cythonize module 18 | ----------------------------------------- 19 | 20 | .. automodule:: pomdp_py.problems.tiger.cythonize 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | pomdp\_py.problems.tiger.tiger\_problem module 26 | ---------------------------------------------- 27 | 28 | .. automodule:: pomdp_py.problems.tiger.tiger_problem 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | Module contents 34 | --------------- 35 | 36 | .. automodule:: pomdp_py.problems.tiger 37 | :members: 38 | :undoc-members: 39 | :show-inheritance: 40 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.representations.belief.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations.belief package 2 | ======================================== 3 | 4 | pomdp\_py.representations.belief.histogram module 5 | ------------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.representations.belief.histogram 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | pomdp\_py.representations.belief.particles module 13 | ------------------------------------------------- 14 | 15 | .. automodule:: pomdp_py.representations.belief.particles 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.representations.distribution.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations.distribution package 2 | ============================================== 3 | 4 | pomdp\_py.representations.distribution.histogram module 5 | ------------------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.representations.distribution.histogram 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | :special-members: __getitem__, __setitem__ 12 | 13 | pomdp\_py.representations.distribution.particles module 14 | ------------------------------------------------------- 15 | 16 | .. automodule:: pomdp_py.representations.distribution.particles 17 | :members: 18 | :undoc-members: 19 | :special-members: __getitem__, __setitem__ 20 | 21 | pomdp\_py.representations.distribution.gaussian module 22 | ------------------------------------------------------- 23 | 24 | .. automodule:: pomdp_py.representations.distribution.gaussian 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | :special-members: __getitem__, __setitem__ 29 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.representations.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.representations package 2 | ================================= 3 | 4 | .. toctree:: 5 | 6 | pomdp_py.representations.belief 7 | pomdp_py.representations.distribution 8 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py package 2 | ================= 3 | 4 | .. toctree:: 5 | 6 | pomdp_py.algorithms 7 | pomdp_py.framework 8 | pomdp_py.representations 9 | pomdp_py.utils 10 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.utils.debugging.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.utils.debugging module 2 | ================================ 3 | 4 | .. automodule:: pomdp_py.utils.debugging 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.utils.interfaces.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.utils.interfaces package 2 | ================================== 3 | 4 | pomdp\_py.utils.interfaces.simple\_rl module 5 | -------------------------------------------- 6 | 7 | .. automodule:: pomdp_py.utils.interfaces.simple_rl 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | -------------------------------------------------------------------------------- /docs/html/_sources/api/pomdp_py.visual.rst.txt: -------------------------------------------------------------------------------- 1 | pomdp\_py.visual package 2 | ======================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | pomdp\_py.visual.search\_tree module 8 | ------------------------------------ 9 | 10 | .. automodule:: pomdp_py.visual.search_tree 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | 16 | Module contents 17 | --------------- 18 | 19 | .. automodule:: pomdp_py.visual 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | -------------------------------------------------------------------------------- /docs/html/_sources/design_principles.rst.txt: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | Design Principles 4 | ***************** 5 | 6 | 7 | 1. Distributions are the fundamental building blocks of a POMDP. 8 | 9 | Essentially, a POMDP describes the interaction between an `agent` and the 10 | `environment`. The interaction is formally encapsulated by a few important 11 | `generative probability distributions`. The core of pomdp_py is built around 12 | this understanding. The interfaces in :py:mod:`pomdp_py.framework.basics` 13 | convey this idea. Using distributions as the building block avoids the 14 | requirement of explicitly enumerating over :math:`S,A,O`. 15 | 16 | -- 17 | 18 | 2. POMDP = agent + environment 19 | 20 | Like above, the gist of a POMDP is captured by the generative probability 21 | distributions including the 22 | :class:`~pomdp_py.framework.basics.TransitionModel`, 23 | :class:`~pomdp_py.framework.basics.ObservationModel`, 24 | :class:`~pomdp_py.framework.basics.RewardModel`. Because, generally, :math:`T, R, O` 25 | may be different for the agent versus the environment (to support learning), 26 | it does not make much sense to have the POMDP class to hold this information; 27 | instead, Agent should have its own :math:`T, R, O, \pi` and the Environment should 28 | have its own :math:`T, R`. The job of a POMDP is only to verify whether a given 29 | state, action, or observation are valid. See :class:`~pomdp_py.framework.basics.Agent` 30 | and :class:`~pomdp_py.framework.basics.Environment`. 31 | 32 | 33 | .. figure:: pomdp.jpg 34 | :alt: POMDP diagram 35 | 36 | A Diagram for POMDP :math:`\langle S,A,\Omega,T,O,R \rangle`. (**correction**: 37 | change :math:`o\in S` to :math:`o\in\Omega`) 38 | 39 | -------------------------------------------------------------------------------- /docs/html/_sources/examples.rst.txt: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | In this document, we discuss some examples of using `pomdp_py` to define POMDP problems and solve them using :doc:`existing_solvers`. We will go over two examples: the simpler Tiger problem, and the more complicated but interesting Multi-Object Search (MOS) problem. The former represents how one could quickly implement a simple POMDP, and the latter represents how one may structure their project (as a convention) when using `pomdp_py` for more complicated domains. 5 | 6 | 7 | Tiger 8 | ***** 9 | 10 | This example describes how one could quickly implement a simple POMDP. 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | examples.tiger 16 | 17 | Multi-Object Search (MOS) 18 | ************************* 19 | 20 | This example describes the convention of how one structures their project when using `pomdp_py` for more complicated domains. 21 | 22 | .. toctree:: 23 | :maxdepth: 1 24 | 25 | examples.mos 26 | -------------------------------------------------------------------------------- /docs/html/_sources/existing_domains.rst.txt: -------------------------------------------------------------------------------- 1 | Existing POMDP Domains 2 | ====================== 3 | 4 | Several domains have been implemented: 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | pomdp_py.problems.multi_object_search.problem 10 | pomdp_py.problems.tiger.tiger_problem 11 | pomdp_py.problems.rocksample.rocksample_problem 12 | pomdp_py.problems.tag 13 | pomdp_py.problems.load_unload 14 | 15 | Some problems that we hope to implement are below. There are even more examples `here `_. Contribution is welcomed. 16 | 17 | * :doc:`problems/pomdp_py.problems.light_dark` 18 | * :doc:`problems/pomdp_py.problems.maze` 19 | 20 | 21 | In addition, the interfaces in `pomdp_py` are general enough to be extended to e.g. learning, multi-agent POMDPs; see :doc:`extensions`. `Contributions are always welcomed!` 22 | -------------------------------------------------------------------------------- /docs/html/_sources/existing_solvers.rst.txt: -------------------------------------------------------------------------------- 1 | Existing POMDP Solvers 2 | ====================== 3 | 4 | The library currently contains an implementation of `POMCP`, `POUCT`, and basic `ValueIteration`. 5 | 6 | .. autosummary:: 7 | :nosignatures: 8 | 9 | ~pomdp_py.algorithms.po_rollout 10 | ~pomdp_py.algorithms.po_uct 11 | ~pomdp_py.algorithms.pomcp 12 | ~pomdp_py.algorithms.value_iteration.ValueIteration 13 | 14 | 15 | The library also currently interfaces with `pomdp-solve `_, developed by Anthony R. Cassandra, and `sarsop `_, developed by NUS. See :doc:`examples.external_solvers` for details and examples. 16 | 17 | .. autosummary:: 18 | :nosignatures: 19 | 20 | ~pomdp_py.utils.interfaces.solvers.sarsop 21 | ~pomdp_py.utils.interfaces.solvers.vi_pruning 22 | 23 | .. note:: 24 | 25 | A pomdp_py :py:mod:`~pomdp_py.framework.basics.Agent` with enumerable state :math:`S`, action :math:`A`, and observation spaces :math:`\Omega`, with explicitly defined probability for its models (:math:`T,O,R`) can be directly used as input to the above functions that interface with the solvers' binaries programs. 26 | -------------------------------------------------------------------------------- /docs/html/_sources/extensions.rst.txt: -------------------------------------------------------------------------------- 1 | Use Case Extensions 2 | =================== 3 | 4 | The interfaces provided by pomdp_py should support projects in these directions (and more): 5 | 6 | 1. POMDP for RL (Reinforcement Learning) 7 | 8 | - Learn a :class:`~pomdp_py.framework.basics.PolicyModel` (model-free) 9 | 10 | - Learn a :class:`~pomdp_py.framework.basics.TransitionModel` and 11 | :class:`~pomdp_py.framework.basics.ObservationModel` (model-based) 12 | 13 | 2. Multi-Agent POMDPs 14 | 15 | - Define multiple :class:`~pomdp_py.framework.basics.Agent` classes. 16 | 17 | 3. Object-Oriented POMDPs 18 | 19 | - The Object-Oriented POMDP (OO-POMDP) already has its interfaces implemented 20 | in :py:mod:`~pomdp_py.framework.oopomdp`. 21 | 22 | 3. Task Transfer or Transfer Learning 23 | 24 | - Define multiple :class:`~pomdp_py.framework.basics.Agent` classes. 25 | 26 | 3. Planning Algorithm Research 27 | 28 | - Use existing POMCP or POUCT as baslines. 29 | -------------------------------------------------------------------------------- /docs/html/_sources/modules.rst.txt: -------------------------------------------------------------------------------- 1 | docs 2 | ==== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/modules.rst.txt: -------------------------------------------------------------------------------- 1 | problems 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | problems 8 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.lasertag.rst.txt: -------------------------------------------------------------------------------- 1 | problems.lasertag package 2 | ========================= 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: problems.lasertag 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.light_dark.agent.rst.txt: -------------------------------------------------------------------------------- 1 | problems.light\_dark.agent package 2 | ================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.light\_dark.agent.belief module 8 | ---------------------------------------- 9 | 10 | .. automodule:: problems.light_dark.agent.belief 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: problems.light_dark.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.light_dark.domain.rst.txt: -------------------------------------------------------------------------------- 1 | problems.light\_dark.domain package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.light\_dark.domain.action module 8 | ----------------------------------------- 9 | 10 | .. automodule:: problems.light_dark.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.light\_dark.domain.observation module 16 | ---------------------------------------------- 17 | 18 | .. automodule:: problems.light_dark.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.light\_dark.domain.state module 24 | ---------------------------------------- 25 | 26 | .. automodule:: problems.light_dark.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.light_dark.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.light_dark.env.rst.txt: -------------------------------------------------------------------------------- 1 | problems.light\_dark.env package 2 | ================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.light\_dark.env.env module 8 | ----------------------------------- 9 | 10 | .. automodule:: problems.light_dark.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.light\_dark.env.plotting module 16 | ---------------------------------------- 17 | 18 | .. automodule:: problems.light_dark.env.plotting 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.light\_dark.env.visual module 24 | -------------------------------------- 25 | 26 | .. automodule:: problems.light_dark.env.visual 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.light_dark.env 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.light_dark.models.rst.txt: -------------------------------------------------------------------------------- 1 | problems.light\_dark.models package 2 | =================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.light\_dark.models.observation\_model module 8 | ----------------------------------------------------- 9 | 10 | .. automodule:: problems.light_dark.models.observation_model 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.light\_dark.models.transition\_model module 16 | ---------------------------------------------------- 17 | 18 | .. automodule:: problems.light_dark.models.transition_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.light_dark.models 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.light_dark.rst.txt: -------------------------------------------------------------------------------- 1 | problems.light\_dark package 2 | ============================ 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.light_dark.agent 11 | problems.light_dark.domain 12 | problems.light_dark.env 13 | problems.light_dark.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | problems.light\_dark.problem\_discrete module 19 | --------------------------------------------- 20 | 21 | .. automodule:: problems.light_dark.problem_discrete 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | problems.light\_dark.test module 27 | -------------------------------- 28 | 29 | .. automodule:: problems.light_dark.test 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | Module contents 35 | --------------- 36 | 37 | .. automodule:: problems.light_dark 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.load_unload.rst.txt: -------------------------------------------------------------------------------- 1 | problems.load\_unload package 2 | ============================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.load\_unload.load\_unload module 8 | ----------------------------------------- 9 | 10 | .. automodule:: problems.load_unload.load_unload 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: problems.load_unload 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.maze.domain.rst.txt: -------------------------------------------------------------------------------- 1 | problems.maze.domain package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.maze.domain.action module 8 | ---------------------------------- 9 | 10 | .. automodule:: problems.maze.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.maze.domain.observation module 16 | --------------------------------------- 17 | 18 | .. automodule:: problems.maze.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.maze.domain.state module 24 | --------------------------------- 25 | 26 | .. automodule:: problems.maze.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.maze.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.maze.env.rst.txt: -------------------------------------------------------------------------------- 1 | problems.maze.env package 2 | ========================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.maze.env.env module 8 | ---------------------------- 9 | 10 | .. automodule:: problems.maze.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: problems.maze.env 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.maze.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | problems.maze.models.components package 2 | ======================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.maze.models.components.map module 8 | ------------------------------------------ 9 | 10 | .. automodule:: problems.maze.models.components.map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: problems.maze.models.components 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.maze.models.rst.txt: -------------------------------------------------------------------------------- 1 | problems.maze.models package 2 | ============================ 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.maze.models.components 11 | 12 | Module contents 13 | --------------- 14 | 15 | .. automodule:: problems.maze.models 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.maze.rst.txt: -------------------------------------------------------------------------------- 1 | problems.maze package 2 | ===================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.maze.domain 11 | problems.maze.env 12 | problems.maze.models 13 | 14 | Module contents 15 | --------------- 16 | 17 | .. automodule:: problems.maze 18 | :members: 19 | :undoc-members: 20 | :show-inheritance: 21 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.agent.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search.agent package 2 | ============================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.multi\_object\_search.agent.agent module 8 | ------------------------------------------------- 9 | 10 | .. automodule:: problems.multi_object_search.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.multi\_object\_search.agent.belief module 16 | -------------------------------------------------- 17 | 18 | .. automodule:: problems.multi_object_search.agent.belief 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.multi_object_search.agent 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.domain.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search.domain package 2 | ============================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.multi\_object\_search.domain.action module 8 | --------------------------------------------------- 9 | 10 | .. automodule:: problems.multi_object_search.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.multi\_object\_search.domain.observation module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: problems.multi_object_search.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.multi\_object\_search.domain.state module 24 | -------------------------------------------------- 25 | 26 | .. automodule:: problems.multi_object_search.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.multi_object_search.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.env.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search.env package 2 | ========================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.multi\_object\_search.env.env module 8 | --------------------------------------------- 9 | 10 | .. automodule:: problems.multi_object_search.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.multi\_object\_search.env.visual module 16 | ------------------------------------------------ 17 | 18 | .. automodule:: problems.multi_object_search.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.multi_object_search.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search.models.components package 2 | ======================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.multi\_object\_search.models.components.grid\_map module 8 | ----------------------------------------------------------------- 9 | 10 | .. automodule:: problems.multi_object_search.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.multi\_object\_search.models.components.sensor module 16 | -------------------------------------------------------------- 17 | 18 | .. automodule:: problems.multi_object_search.models.components.sensor 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.multi_object_search.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.models.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search.models package 2 | ============================================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.multi_object_search.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | problems.multi\_object\_search.models.observation\_model module 16 | --------------------------------------------------------------- 17 | 18 | .. automodule:: problems.multi_object_search.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.multi\_object\_search.models.policy\_model module 24 | ---------------------------------------------------------- 25 | 26 | .. automodule:: problems.multi_object_search.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | problems.multi\_object\_search.models.reward\_model module 32 | ---------------------------------------------------------- 33 | 34 | .. automodule:: problems.multi_object_search.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | problems.multi\_object\_search.models.transition\_model module 40 | -------------------------------------------------------------- 41 | 42 | .. automodule:: problems.multi_object_search.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: problems.multi_object_search.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.multi_object_search.rst.txt: -------------------------------------------------------------------------------- 1 | problems.multi\_object\_search package 2 | ====================================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.multi_object_search.agent 11 | problems.multi_object_search.domain 12 | problems.multi_object_search.env 13 | problems.multi_object_search.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | problems.multi\_object\_search.example\_worlds module 19 | ----------------------------------------------------- 20 | 21 | .. automodule:: problems.multi_object_search.example_worlds 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | problems.multi\_object\_search.problem module 27 | --------------------------------------------- 28 | 29 | .. automodule:: problems.multi_object_search.problem 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | Module contents 35 | --------------- 36 | 37 | .. automodule:: problems.multi_object_search 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.rocksample.cythonize.rst.txt: -------------------------------------------------------------------------------- 1 | problems.rocksample.cythonize package 2 | ===================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.rocksample.cythonize.rocksample\_problem module 8 | -------------------------------------------------------- 9 | 10 | .. automodule:: problems.rocksample.cythonize.rocksample_problem 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.rocksample.cythonize.rocksample\_problem module 16 | -------------------------------------------------------- 17 | 18 | .. automodule:: problems.rocksample.cythonize.rocksample_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.rocksample.cythonize.run\_rocksample module 24 | ---------------------------------------------------- 25 | 26 | .. automodule:: problems.rocksample.cythonize.run_rocksample 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.rocksample.cythonize 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.rocksample.rst.txt: -------------------------------------------------------------------------------- 1 | problems.rocksample package 2 | =========================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.rocksample.cythonize 11 | 12 | Submodules 13 | ---------- 14 | 15 | problems.rocksample.rocksample\_problem module 16 | ---------------------------------------------- 17 | 18 | .. automodule:: problems.rocksample.rocksample_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.rocksample 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.rst.txt: -------------------------------------------------------------------------------- 1 | problems package 2 | ================ 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.lasertag 11 | problems.light_dark 12 | problems.load_unload 13 | problems.maze 14 | problems.multi_object_search 15 | problems.rocksample 16 | problems.tag 17 | problems.tiger 18 | 19 | Module contents 20 | --------------- 21 | 22 | .. automodule:: problems 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.agent.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag.agent package 2 | ========================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.tag.agent.agent module 8 | ------------------------------- 9 | 10 | .. automodule:: problems.tag.agent.agent 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: problems.tag.agent 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.domain.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag.domain package 2 | =========================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.tag.domain.action module 8 | --------------------------------- 9 | 10 | .. automodule:: problems.tag.domain.action 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.tag.domain.observation module 16 | -------------------------------------- 17 | 18 | .. automodule:: problems.tag.domain.observation 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.tag.domain.state module 24 | -------------------------------- 25 | 26 | .. automodule:: problems.tag.domain.state 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.tag.domain 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.env.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag.env package 2 | ======================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.tag.env.env module 8 | --------------------------- 9 | 10 | .. automodule:: problems.tag.env.env 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.tag.env.visual module 16 | ------------------------------ 17 | 18 | .. automodule:: problems.tag.env.visual 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.tag.env 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.models.components.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag.models.components package 2 | ====================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.tag.models.components.grid\_map module 8 | ----------------------------------------------- 9 | 10 | .. automodule:: problems.tag.models.components.grid_map 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.tag.models.components.motion\_policy module 16 | ---------------------------------------------------- 17 | 18 | .. automodule:: problems.tag.models.components.motion_policy 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.tag.models.components 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.models.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag.models package 2 | =========================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.tag.models.components 11 | 12 | Submodules 13 | ---------- 14 | 15 | problems.tag.models.observation\_model module 16 | --------------------------------------------- 17 | 18 | .. automodule:: problems.tag.models.observation_model 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.tag.models.policy\_model module 24 | ---------------------------------------- 25 | 26 | .. automodule:: problems.tag.models.policy_model 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | problems.tag.models.reward\_model module 32 | ---------------------------------------- 33 | 34 | .. automodule:: problems.tag.models.reward_model 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | problems.tag.models.transition\_model module 40 | -------------------------------------------- 41 | 42 | .. automodule:: problems.tag.models.transition_model 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | Module contents 48 | --------------- 49 | 50 | .. automodule:: problems.tag.models 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tag.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tag package 2 | ==================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.tag.agent 11 | problems.tag.domain 12 | problems.tag.env 13 | problems.tag.models 14 | 15 | Submodules 16 | ---------- 17 | 18 | problems.tag.constants module 19 | ----------------------------- 20 | 21 | .. automodule:: problems.tag.constants 22 | :members: 23 | :undoc-members: 24 | :show-inheritance: 25 | 26 | problems.tag.example\_worlds module 27 | ----------------------------------- 28 | 29 | .. automodule:: problems.tag.example_worlds 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | problems.tag.experiment module 35 | ------------------------------ 36 | 37 | .. automodule:: problems.tag.experiment 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | problems.tag.problem module 43 | --------------------------- 44 | 45 | .. automodule:: problems.tag.problem 46 | :members: 47 | :undoc-members: 48 | :show-inheritance: 49 | 50 | Module contents 51 | --------------- 52 | 53 | .. automodule:: problems.tag 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tiger.cythonize.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tiger.cythonize package 2 | ================================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | problems.tiger.cythonize.run\_tiger module 8 | ------------------------------------------ 9 | 10 | .. automodule:: problems.tiger.cythonize.run_tiger 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | problems.tiger.cythonize.tiger\_problem module 16 | ---------------------------------------------- 17 | 18 | .. automodule:: problems.tiger.cythonize.tiger_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | problems.tiger.cythonize.tiger\_problem module 24 | ---------------------------------------------- 25 | 26 | .. automodule:: problems.tiger.cythonize.tiger_problem 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Module contents 32 | --------------- 33 | 34 | .. automodule:: problems.tiger.cythonize 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /docs/html/_sources/problems/problems.tiger.rst.txt: -------------------------------------------------------------------------------- 1 | problems.tiger package 2 | ====================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | problems.tiger.cythonize 11 | 12 | Submodules 13 | ---------- 14 | 15 | problems.tiger.tiger\_problem module 16 | ------------------------------------ 17 | 18 | .. automodule:: problems.tiger.tiger_problem 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: problems.tiger 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/html/_sources/simple_rl_integration.rst.txt: -------------------------------------------------------------------------------- 1 | Integration with `simple_rl` 2 | ============================ 3 | 4 | .. include:: api/pomdp_py.utils.interfaces.rst 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | div.sphinxsidebar { 2 | max-height: 100%; 3 | overflow-y: auto; 4 | } 5 | 6 | h2 a.toc-backref, h3 a.toc-backref { 7 | color: #000; 8 | text-decoration: none; 9 | } 10 | 11 | .contents.local.topic a { 12 | color: #330000 13 | } 14 | 15 | /* Scrollbar */ 16 | html { 17 | --scrollbarBG: #EFEFEF; 18 | --thumbBG: #CDCDCD;b 19 | } 20 | body::-webkit-scrollbar { 21 | width: 14px; 22 | } 23 | body { 24 | scrollbar-width: thin; 25 | scrollbar-color: var(--thumbBG) var(--scrollbarBG); 26 | } 27 | body::-webkit-scrollbar-track { 28 | background: var(--scrollbarBG); 29 | } 30 | body::-webkit-scrollbar-thumb { 31 | background-color: var(--thumbBG) ; 32 | border-radius: 6px; 33 | border: 3px solid var(--scrollbarBG); 34 | } 35 | 36 | div.sphinxsidebar::-webkit-scrollbar { 37 | width: 11px; 38 | } 39 | div.sphinxsidebar { 40 | scrollbar-width: thin; 41 | scrollbar-color: var(--thumbBG) var(--scrollbarBG); 42 | } 43 | div.sphinxsidebar::-webkit-scrollbar-track { 44 | background: var(--scrollbarBG); 45 | } 46 | div.sphinxsidebar::-webkit-scrollbar-thumb { 47 | background-color: var(--thumbBG) ; 48 | border-radius: 6px; 49 | border: 3px solid var(--scrollbarBG); 50 | } 51 | 52 | ul.simple li p { 53 | margin-bottom: 0px; 54 | } 55 | -------------------------------------------------------------------------------- /docs/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '1.3.5.1', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/html/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_static/favicon.ico -------------------------------------------------------------------------------- /docs/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_static/file.png -------------------------------------------------------------------------------- /docs/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_static/logo.png -------------------------------------------------------------------------------- /docs/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_static/minus.png -------------------------------------------------------------------------------- /docs/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/_static/plus.png -------------------------------------------------------------------------------- /docs/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/docs/html/objects.inv -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Redirecting... 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 |
23 |
24 |

Redirecting...

25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /pomdp_py/__init__.py: -------------------------------------------------------------------------------- 1 | import pomdp_py.utils as util 2 | 3 | # Framework 4 | from pomdp_py.framework.basics import * 5 | from pomdp_py.framework.oopomdp import * 6 | from pomdp_py.framework.planner import * 7 | 8 | # Representations 9 | from pomdp_py.representations.distribution.particles import Particles, WeightedParticles 10 | from pomdp_py.representations.distribution.histogram import Histogram 11 | from pomdp_py.representations.distribution.gaussian import Gaussian 12 | from pomdp_py.representations.belief.histogram import update_histogram_belief 13 | from pomdp_py.representations.belief.particles import update_particles_belief 14 | from pomdp_py.utils.interfaces.conversion import ( 15 | to_pomdp_file, 16 | to_pomdpx_file, 17 | AlphaVectorPolicy, 18 | PolicyGraph, 19 | ) 20 | from pomdp_py.utils.interfaces.solvers import vi_pruning, sarsop 21 | 22 | # Algorithms 23 | from pomdp_py.algorithms.value_iteration import ValueIteration # Cython compiled 24 | from pomdp_py.algorithms.value_function import value, qvalue, belief_update 25 | from pomdp_py.algorithms.pomcp import POMCP 26 | from pomdp_py.algorithms.po_rollout import PORollout 27 | from pomdp_py.algorithms.po_uct import ( 28 | POUCT, 29 | QNode, 30 | VNode, 31 | RootVNode, 32 | RolloutPolicy, 33 | RandomRollout, 34 | ActionPrior, 35 | ) 36 | from pomdp_py.algorithms.bsp.blqr import BLQR 37 | 38 | # Templates & Utilities 39 | from pomdp_py.utils.templates import * 40 | from pomdp_py.utils.debugging import TreeDebugger 41 | -------------------------------------------------------------------------------- /pomdp_py/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | available_problems = ["tiger", "rocksample", "mos", "tag", "load_unload"] 4 | 5 | 6 | def parse_args(): 7 | parser = argparse.ArgumentParser(description="pomdp_py CLI") 8 | parser.add_argument( 9 | "-r", 10 | "--run", 11 | type=str, 12 | help="run a pomdp under pomdp_py.problems.Available options: {}".format( 13 | available_problems 14 | ), 15 | ) 16 | args = parser.parse_args() 17 | return parser, args 18 | 19 | 20 | if __name__ == "__main__": 21 | parser, args = parse_args() 22 | if args.run: 23 | if args.run.lower() == "tiger": 24 | from pomdp_py.problems.tiger.tiger_problem import main 25 | 26 | main() 27 | 28 | elif args.run.lower() == "rocksample": 29 | from pomdp_py.problems.rocksample.rocksample_problem import main 30 | 31 | main() 32 | 33 | elif args.run.lower() == "mos": 34 | from pomdp_py.problems.multi_object_search.problem import unittest 35 | 36 | unittest() 37 | 38 | elif args.run.lower() == "tag": 39 | from pomdp_py.problems.tag.problem import main 40 | 41 | main() 42 | 43 | elif args.run.lower() == "load_unload": 44 | from pomdp_py.problems.load_unload.load_unload import main 45 | 46 | main() 47 | 48 | else: 49 | print("Unrecognized pomdp: {}".format(args.run)) 50 | 51 | else: 52 | parser.print_help() 53 | -------------------------------------------------------------------------------- /pomdp_py/algorithms/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/algorithms/__init__.py -------------------------------------------------------------------------------- /pomdp_py/algorithms/bsp/README.rst: -------------------------------------------------------------------------------- 1 | Belief Space Planning 2 | ===================== 3 | 4 | An attempt to implement the BLQR algorithm in the paper: 5 | 6 | Reference: `Belief space planning assuming maximum likelihood observations `_. 7 | 8 | Current status: **Not complete.** The scipy's `SLSQP 9 | `_ 10 | does not seem to be able to solve the quadratic program (cannot satisfy the 11 | constraints). Contribution is wanted (either rewrite the whole algorithm or use a different solver). 12 | This algorithm should be used to solve the `light dark domain `_. 13 | -------------------------------------------------------------------------------- /pomdp_py/algorithms/bsp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/algorithms/bsp/__init__.py -------------------------------------------------------------------------------- /pomdp_py/algorithms/po_rollout.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport Action, State, Observation, Agent 2 | from pomdp_py.framework.planner cimport Planner 3 | from pomdp_py.algorithms.po_uct cimport RolloutPolicy, ActionPrior 4 | 5 | cdef class PORollout(Planner): 6 | 7 | cdef int _num_sims 8 | cdef int _max_depth 9 | cdef RolloutPolicy _rollout_policy 10 | cdef ActionPrior _action_prior 11 | cdef float _discount_factor 12 | cdef bint _particles 13 | cdef Agent _agent 14 | cdef float _last_best_reward 15 | 16 | cpdef _search(self) 17 | cpdef _rollout(self, State state, int depth) 18 | cpdef update(self, Agent agent, Action real_action, Observation real_observation, 19 | state_transform_func=*) 20 | 21 | cpdef set_rollout_policy(self, RolloutPolicy rollout_policy) 22 | -------------------------------------------------------------------------------- /pomdp_py/algorithms/po_uct.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.planner cimport Planner 2 | from pomdp_py.framework.basics cimport Agent, PolicyModel, Action, State, Observation 3 | 4 | cdef class TreeNode: 5 | cdef public dict children 6 | cdef public int num_visits 7 | cdef public float value 8 | 9 | cdef class QNode(TreeNode): 10 | pass 11 | 12 | cdef class VNode(TreeNode): 13 | cpdef argmax(VNode self) 14 | 15 | cdef class RootVNode(VNode): 16 | cdef public tuple history 17 | 18 | cdef class POUCT(Planner): 19 | cdef int _max_depth 20 | cdef float _planning_time 21 | cdef int _num_sims 22 | cdef int _num_visits_init 23 | cdef float _value_init 24 | cdef float _discount_factor 25 | cdef float _exploration_const 26 | cdef ActionPrior _action_prior 27 | cdef RolloutPolicy _rollout_policy 28 | cdef Agent _agent 29 | cdef int _last_num_sims 30 | cdef float _last_planning_time 31 | cdef bint _show_progress 32 | cdef int _pbar_update_interval 33 | 34 | cpdef _search(self) 35 | cdef _initialize_progress_bar(self) 36 | cpdef _perform_simulation(self, state) 37 | cdef bint _should_stop(self, int sims_count, double start_time) 38 | cdef _update_progress(self, pbar, int sims_count, double start_time) 39 | cdef _finalize_progress_bar(self, pbar) 40 | 41 | cpdef _simulate(POUCT self, 42 | State state, tuple history, VNode root, QNode parent, 43 | Observation observation, int depth) 44 | 45 | cpdef _expand_vnode(self, VNode vnode, tuple history, State state=*) 46 | cpdef _rollout(self, State state, tuple history, VNode root, int depth) 47 | cpdef Action _ucb(self, VNode root) 48 | cpdef tuple _sample_generative_model(self, State state, Action action) 49 | cpdef set_rollout_policy(self, RolloutPolicy rollout_policy) 50 | 51 | cdef class RolloutPolicy(PolicyModel): 52 | cpdef Action rollout(self, State state, tuple history) 53 | 54 | cdef class RandomRollout(RolloutPolicy): 55 | pass 56 | 57 | cdef class ActionPrior: 58 | cpdef get_preferred_actions(ActionPrior self, State state, tuple history) 59 | -------------------------------------------------------------------------------- /pomdp_py/algorithms/pomcp.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.algorithms.po_uct cimport VNode, RootVNode 2 | from pomdp_py.representations.distribution.particles cimport Particles 3 | 4 | cdef class VNodeParticles(VNode): 5 | cdef public Particles belief 6 | cdef class RootVNodeParticles(RootVNode): 7 | cdef public Particles belief 8 | -------------------------------------------------------------------------------- /pomdp_py/algorithms/value_iteration.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/algorithms/value_iteration.pxd -------------------------------------------------------------------------------- /pomdp_py/framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/framework/__init__.py -------------------------------------------------------------------------------- /pomdp_py/framework/basics.pxd: -------------------------------------------------------------------------------- 1 | cdef class Distribution: 2 | pass 3 | cdef class GenerativeDistribution(Distribution): 4 | pass 5 | cdef class ObservationModel: 6 | pass 7 | cdef class TransitionModel: 8 | pass 9 | cdef class PolicyModel: 10 | pass 11 | cdef class BlackboxModel: 12 | pass 13 | cdef class RewardModel: 14 | pass 15 | 16 | cdef class POMDP: 17 | cdef public Agent agent 18 | cdef public Environment env 19 | cdef public str name 20 | 21 | cdef class Action: 22 | cdef public str name 23 | 24 | cdef class State: 25 | pass 26 | 27 | cdef class Observation: 28 | pass 29 | 30 | cdef class Agent: 31 | cdef GenerativeDistribution _init_belief 32 | cdef PolicyModel _policy_model 33 | cdef TransitionModel _transition_model 34 | cdef RewardModel _reward_model 35 | cdef ObservationModel _observation_model 36 | cdef BlackboxModel _blackbox_model 37 | cdef GenerativeDistribution _cur_belief 38 | cdef tuple _history 39 | cdef dict __dict__ 40 | cdef str _name 41 | 42 | cdef class Environment: 43 | cdef State _init_state 44 | cdef TransitionModel _transition_model 45 | cdef RewardModel _reward_model 46 | cdef BlackboxModel _blackbox_model 47 | cdef State _cur_state 48 | 49 | cdef class Option(Action): 50 | pass 51 | 52 | cpdef sample_generative_model(Agent agent, State state, Action action, float discount_factor=*) 53 | cpdef sample_explict_models(TransitionModel T, ObservationModel O, RewardModel R, State state, Action a, float discount_factor=*) 54 | -------------------------------------------------------------------------------- /pomdp_py/framework/oopomdp.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport POMDP, State, Action, Observation,\ 2 | ObservationModel, TransitionModel, GenerativeDistribution 3 | 4 | cdef class OOPOMDP(POMDP): 5 | pass 6 | 7 | cdef class ObjectState(State): 8 | cdef public str objclass 9 | cdef public dict attributes 10 | cdef int _hashcache 11 | 12 | cdef class OOState(State): 13 | cdef public dict object_states 14 | cdef frozenset _situation 15 | cdef int _hashcache 16 | 17 | cdef class OOTransitionModel(TransitionModel): 18 | cdef dict _transition_models 19 | 20 | cdef class OOObservation(Observation): 21 | pass 22 | 23 | cdef class OOObservationModel(ObservationModel): 24 | cdef dict _observation_models 25 | 26 | cdef class OOBelief(GenerativeDistribution): 27 | cdef dict _object_beliefs 28 | 29 | cdef class DictState(ObjectState): 30 | pass 31 | -------------------------------------------------------------------------------- /pomdp_py/framework/planner.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport Action, Agent, Observation, State 2 | 3 | cdef class Planner: 4 | 5 | cpdef public plan(self, Agent agent) 6 | cpdef public update(self, Agent agent, Action real_action, Observation real_observation) 7 | -------------------------------------------------------------------------------- /pomdp_py/framework/planner.pyx: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport Action, Agent, Observation, State, Option,\ 2 | TransitionModel, ObservationModel, RewardModel 3 | 4 | cdef class Planner: 5 | """A Planner can :meth:`plan` the next action to take for a given agent (online 6 | planning). The planner can be updated (which may also update the agent belief) 7 | once an action is executed and observation received. 8 | 9 | A Planner may be a purely planning algorithm, or it could be using a learned 10 | model for planning underneath the hood. Its job is to output an action to take 11 | for a given agent. 12 | 13 | You can implement a Planner that is specific to an agent, or not. If specific, then 14 | when calling :meth:`plan` the agent passed in is expected to always be the same one. 15 | """ 16 | cpdef public plan(self, Agent agent): 17 | """ 18 | plan(self, Agent agent) 19 | The agent carries the information: 20 | Bt, ht, O,T,R/G, pi, necessary for planning""" 21 | raise NotImplementedError 22 | 23 | cpdef public update(self, Agent agent, Action real_action, Observation real_observation): 24 | """ 25 | update(self, Agent agent, Action real_action, Observation real_observation) 26 | Updates the planner based on real action and observation. 27 | Updates the agent accordingly if necessary. If the agent's 28 | belief is also updated here, the `update_agent_belief` 29 | attribute should be set to True. By default, does nothing.""" 30 | pass 31 | 32 | def updates_agent_belief(self): 33 | """True if planner's update function also updates agent's 34 | belief.""" 35 | return False 36 | -------------------------------------------------------------------------------- /pomdp_py/problems/__init__.py: -------------------------------------------------------------------------------- 1 | from pomdp_py.problems import tiger 2 | -------------------------------------------------------------------------------- /pomdp_py/problems/lasertag/README.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/lasertag/README.rst -------------------------------------------------------------------------------- /pomdp_py/problems/lasertag/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/lasertag/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/README.rst: -------------------------------------------------------------------------------- 1 | Light-Dark 2 | ========== 3 | 4 | A simple continuous domain. 5 | 6 | Reference: `Belief space planning assuming maximum likelihood observations `_. 7 | 8 | `Quoting from the original paper on problem description`: 9 | 10 | In the light-dark domain, a robot must localize its position in the plane before approaching the goal. The robot’s ability to localize itself depends upon the amount of light present at its actual position. Light varies as a quadratic function of the horizontal coordinate. Depending upon the goal position, the initial robot position, and the configuration of the light, the robot may need to move away from its ultimate goal in order to localize itself. Figure 1 illustrates the configuration of the light-dark domain used in our experiments. The goal position is at the origin, marked by an X in the figure. The intensity in the figure illustrates the magnitude of the light over the plane. The robot’s initial position is unknown. 11 | 12 | .. figure:: https://i.imgur.com/7OYr6Hh.jpg 13 | :alt: Figure from the paper 14 | 15 | Light-Dark domain 16 | 17 | 18 | Note that a variant of this domain appears in `Online algorithms for POMDPs with continuous state, action, and observation spaces `_ where the state and action spaces are discrete and the observation space is kept continuous. Here we do not implement this variant; You can implement it and create a pull request! 19 | 20 | There is an implementation of a variant of LightDarkDomain in the JuliaPOMDP suite (`repo `_). 21 | 22 | **BLQR planning implementation not complete yet.** 23 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/__init__.py: -------------------------------------------------------------------------------- 1 | from pomdp_py.problems.light_dark.env.env import LightDarkEnvironment 2 | from pomdp_py.problems.light_dark.env.visual import LightDarkViz 3 | from pomdp_py.problems.light_dark.domain.state import * 4 | from pomdp_py.problems.light_dark.domain.action import * 5 | from pomdp_py.problems.light_dark.domain.observation import * 6 | from pomdp_py.problems.light_dark.models.transition_model import * 7 | from pomdp_py.problems.light_dark.models.observation_model import * 8 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/light_dark/agent/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/domain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/light_dark/domain/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/domain/action.py: -------------------------------------------------------------------------------- 1 | """Defines the Action for the continuous light-dark domain; 2 | 3 | Origin: Belief space planning assuming maximum likelihood observations 4 | 5 | Action space: 6 | 7 | :math:`U\subseteq\mathbb{R}^2`. Quote from the paper: "The robot is 8 | modeled as a first-order system such that the robot velocity is determined 9 | by the control actions, :math:`u\in\mathbb{R}^2`. 10 | """ 11 | 12 | import pomdp_py 13 | 14 | 15 | class Action(pomdp_py.Action): 16 | """The action is a vector of velocities""" 17 | 18 | def __init__(self, control): 19 | """ 20 | Initializes a state in light dark domain. 21 | 22 | Args: 23 | control (tuple): velocity 24 | """ 25 | if len(control) != 2: 26 | raise ValueError("Action control must be a vector of length 2") 27 | self.control = control 28 | 29 | def __hash__(self): 30 | return hash(self.control) 31 | 32 | def __eq__(self, other): 33 | if isinstance(other, Action): 34 | return self.control == other.control 35 | else: 36 | return False 37 | 38 | def __str__(self): 39 | return self.__repr__() 40 | 41 | def __repr__(self): 42 | return "Action(%s)" % (str(self.control)) 43 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/domain/observation.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | 3 | 4 | class Observation(pomdp_py.Observation): 5 | """Defines the Observation for the continuous light-dark domain; 6 | 7 | Observation space: 8 | 9 | :math:`\Omega\subseteq\mathbb{R}^2` the observation of the robot is 10 | an estimate of the robot position :math:`g(x_t)\in\Omega`. 11 | 12 | """ 13 | 14 | # the number of decimals to round up an observation when it is discrete. 15 | PRECISION = 2 16 | 17 | def __init__(self, position, discrete=False): 18 | """ 19 | Initializes a observation in light dark domain. 20 | 21 | Args: 22 | position (tuple): position of the robot. 23 | """ 24 | self._discrete = discrete 25 | if len(position) != 2: 26 | raise ValueError("Observation position must be a vector of length 2") 27 | if self._discrete: 28 | self.position = position 29 | else: 30 | self.position = ( 31 | round(position[0], Observation.PRECISION), 32 | round(position[1], Observation.PRECISION), 33 | ) 34 | 35 | def discretize(self): 36 | return Observation(self.position, discrete=True) 37 | 38 | def __hash__(self): 39 | return hash(self.position) 40 | 41 | def __eq__(self, other): 42 | if isinstance(other, Observation): 43 | return self.position == other.position 44 | else: 45 | return False 46 | 47 | def __str__(self): 48 | return self.__repr__() 49 | 50 | def __repr__(self): 51 | return "Observation(%s)" % (str(self.position)) 52 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/domain/state.py: -------------------------------------------------------------------------------- 1 | """Defines the State for the continuous light-dark domain; 2 | 3 | Origin: Belief space planning assuming maximum likelihood observations 4 | 5 | State space: 6 | 7 | :math:`X\subseteq\mathbb{R}^2` the state of the robot 8 | """ 9 | 10 | import pomdp_py 11 | import numpy as np 12 | 13 | 14 | class State(pomdp_py.State): 15 | """The state of the problem is just the robot position""" 16 | 17 | def __init__(self, position): 18 | """ 19 | Initializes a state in light dark domain. 20 | 21 | Args: 22 | position (tuple): position of the robot. 23 | """ 24 | if len(position) != 2: 25 | raise ValueError("State position must be a vector of length 2") 26 | self.position = position 27 | 28 | def __hash__(self): 29 | return hash(self.position) 30 | 31 | def __eq__(self, other): 32 | if isinstance(other, State): 33 | return self.position == other.position 34 | else: 35 | return False 36 | 37 | def __str__(self): 38 | return self.__repr__() 39 | 40 | def __repr__(self): 41 | return "State(%s)" % (str(self.position)) 42 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/light_dark/env/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/env/env.py: -------------------------------------------------------------------------------- 1 | """Defines the Environment for the light dark domain. 2 | 3 | Origin: Belief space planning assuming maximum likelihood observations 4 | """ 5 | 6 | import pomdp_py 7 | import pomdp_py.problems.light_dark as ld 8 | import numpy as np 9 | 10 | 11 | class LightDarkEnvironment(pomdp_py.Environment): 12 | def __init__(self, init_state, light, const, reward_model=None): 13 | """ 14 | Args: 15 | init_state (light_dark.domain.State or np.ndarray): 16 | initial true state of the light-dark domain, 17 | goal_pos (tuple): goal position (x,y) 18 | light (float): see below 19 | const (float): see below 20 | reward_model (pomdp_py.RewardModel): A reward model used to evaluate a policy 21 | `light` and `const` are parameters in 22 | :math:`w(x) = \frac{1}{2}(\text{light}-s_x)^2 + \text{const}` 23 | 24 | Basically, there is "light" at the x location at `light`, 25 | and the farther you are from it, the darker it is. 26 | """ 27 | self._light = light 28 | self._const = const 29 | transition_model = ld.TransitionModel() 30 | if type(init_state) == np.ndarray: 31 | init_state = ld.State(init_state) 32 | super().__init__(init_state, transition_model, reward_model) 33 | 34 | @property 35 | def light(self): 36 | return self._light 37 | 38 | @property 39 | def const(self): 40 | return self._const 41 | -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/light_dark/models/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/light_dark/problem_discrete.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | 3 | 4 | class DiscreteLightDark(pomdp_py.POMDP): 5 | pass 6 | -------------------------------------------------------------------------------- /pomdp_py/problems/load_unload/README.rst: -------------------------------------------------------------------------------- 1 | Load/Unload 2 | =========== 3 | 4 | Problem originally introduced in `Solving POMDPs by Searching the Space of Finite Policies `_ 5 | 6 | `Quoting from the original paper on problem description`: 7 | 8 | The load/unload problem with 8 locations: the agent starts in the "Unload" location (U) and receives a reward each time it returns to this place after passing through the "Load" location (L). The problem is partially observable because the agent cannot distinguish the different locations in between Load and Unload, and because it cannot perceive if it is loaded or not (:math:`|S| = 14`, :math:`|O| = 3` and :math:`|A| = 2`). 9 | 10 | Figure from the paper: 11 | 12 | .. figure:: https://i.imgur.com/3OYqqko.png 13 | :alt: Load/Unload Problem. 14 | 15 | Load/Unload problem 16 | 17 | .. code-block:: 18 | 19 | python -m pomdp_py -r load_unload 20 | -------------------------------------------------------------------------------- /pomdp_py/problems/load_unload/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/load_unload/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/maze/README.rst: -------------------------------------------------------------------------------- 1 | Maze 2 | ==== 3 | 4 | Problem originally introduced in `Solving POMDPs by Searching the Space of Finite Policies `_ 5 | 6 | `Quoting from the original paper on problem description`: 7 | 8 | A partially observable stochastic maze: the agent must go from the starting state marked with an "S" to the goal marked with an "G". The problem is partially observable because the agent cannot perceive its true location, but only its orientation and the presence or the absence of a wall on each side of the square defining its current state. The problem is stochastic because there is a non-zero probability of slipping, so that the agent does not always know if its last attempt to make a move had any consequence on its actual position in the maze. 9 | 10 | .. figure:: https://i.imgur.com/i1RDsrL.png 11 | :alt: Figure from the paper 12 | 13 | Maze POMDP 14 | 15 | 16 | **TODO** 17 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Maze 3 | ==== 4 | 5 | Problem originally introduced in `Solving POMDPs by Searching the Space of Finite Policies `_ 6 | 7 | `Quoting from the original paper on problem description`: 8 | 9 | A partially observable stochastic maze: the agent must go from the starting state marked with an "S" to the goal marked with an "G". The problem is partially observable because the agent cannot perceive its true location, but only its orientation and the presence or the absence of a wall on each side of the square defining its current state. The problem is stochastic because there is a non-zero probability of slipping, so that the agent does not always know if its last attempt to make a move had any consequence on its actual position in the maze. 10 | 11 | .. figure:: https://i.imgur.com/i1RDsrL.png 12 | :alt: Figure from the paper 13 | 14 | Maze POMDP 15 | 16 | 17 | **Not yet implemented** 18 | """ 19 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/domain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/maze/domain/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/maze/domain/action.py: -------------------------------------------------------------------------------- 1 | """ 2 | The agent can take motion action and a look action. 3 | """ 4 | 5 | # Reuses the actions in the multi object search domain 6 | import pomdp_py 7 | from pomdp_py.problems.multi_object_search.domain.action import ( 8 | MotionAction, 9 | MoveForward, 10 | MoveBackward, 11 | MoveLeft, 12 | MoveRight, 13 | LookAction, 14 | ) 15 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/domain/observation.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | 3 | 4 | # we index the walls around a grid cell in 5 | # clockwise fashion: top wall (0), right wall (1), 6 | # bottom wall (2), left wall (3). 7 | WALL = {0: "top", 1: "right", 2: "bottom", 3: "left"} 8 | 9 | 10 | class Observation(pomdp_py.Observation): 11 | def __init__(self, walls, orientation): 12 | """ 13 | Args: 14 | walls (tuple) is a tuple of integers, that indicate the walls 15 | around a grid cell that are present. 16 | orientation (float) is the orientation of the robot. 17 | """ 18 | self.walls = walls 19 | self.orientation = orientation 20 | 21 | def __hash__(self): 22 | return hash((self.wall_case, self.orientation)) 23 | 24 | def __eq__(self, other): 25 | if not isinstance(other, Observation): 26 | return False 27 | else: 28 | return self.walls == other.walls and self.orientation == other.orientation 29 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/domain/state.py: -------------------------------------------------------------------------------- 1 | """Defines the State for the maze domain, which is the position of the robot and its orientation. 2 | """ 3 | 4 | import pomdp_py 5 | import numpy as np 6 | 7 | 8 | class State(pomdp_py.State): 9 | """The state of the problem is just the robot position""" 10 | 11 | def __init__(self, positition, orientation): 12 | """ 13 | Initializes a state in light dark domain. 14 | 15 | Args: 16 | position (tuple): position of the robot. 17 | """ 18 | if len(position) != 2: 19 | raise ValueError("State position must be a vector of length 2") 20 | self.position = positition 21 | self.orientation = orientation 22 | 23 | def __hash__(self): 24 | return hash(self.position, self.orientation) 25 | 26 | def __eq__(self, other): 27 | if isinstance(other, State): 28 | return self.position == other.position 29 | else: 30 | return False 31 | 32 | def __str__(self): 33 | return self.__repr__() 34 | 35 | def __repr__(self): 36 | return "State(%s)" % (str(self.position, self.orientation)) 37 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/maze/env/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/maze/env/env.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | 3 | 4 | class MazeEnvironment(pomdp_py.Environment): 5 | def __init__(self, init_state): 6 | pass 7 | -------------------------------------------------------------------------------- /pomdp_py/problems/maze/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/maze/models/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/maze/models/components/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/maze/models/components/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/maze/models/components/map.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | class MazeMap: 5 | def __init__(self): 6 | pass 7 | 8 | def from_dict(self, mapdict): 9 | pass 10 | 11 | 12 | example_mapdict = { 13 | "start": (5, 6), 14 | "goal": (5, 3), 15 | "walls": { 16 | "top": [[(0, 0), (10, 0)], [(2, 1), (8, 1)], [(4, 2), (6, 2)]], 17 | "bottom": [ 18 | [(0, 6), (10, 6)], 19 | [(1, 5), (9, 5)][(3, 4), (7, 4)], 20 | [(5, 3), (5, 3)], 21 | ], 22 | "left": [ 23 | [(0, 0), (0, 6)], 24 | [(1, 1), (5, 5)], 25 | [(2, 1), (2, 4)], 26 | [(3, 2), (3, 4)], 27 | [(4, 2), (4, 3)], 28 | [(5, 3), (5, 3)], 29 | ], 30 | "right": [ 31 | [(5, 3), (5, 3)][(6, 2), (6, 3)], 32 | [(7, 2), (7, 4)], 33 | [(8, 1), (8, 4)], 34 | [(9, 1), (9, 5)], 35 | [(10, 0), (10, 6)], 36 | ], 37 | }, 38 | } 39 | -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/README.rst: -------------------------------------------------------------------------------- 1 | Multi-Object Search (MOS) Task 2 | ============================== 3 | 4 | This task is based on the Multi-Object Search (MOS) task described in the 5 | following paper 6 | 7 | `Multi-Object Search using Object-Oriented POMDPs `_ (ICRA 2019) 8 | 9 | In this implementation, we consider a different (simpler) motion action scheme, 10 | instead of based on topological graph and room connectivity. 11 | 12 | Refer to :doc:`examples.mos` for more details. 13 | -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/multi_object_search/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/multi_object_search/agent/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/domain/__init__.py: -------------------------------------------------------------------------------- 1 | """**Defines state, action and observation**""" 2 | -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/multi_object_search/env/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/models/__init__.py: -------------------------------------------------------------------------------- 1 | """**Defines models, including transition, observation, reward, policy; Also 2 | includes additional components such as the sensor model and grid map.**""" 3 | -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/models/components/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/multi_object_search/models/components/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/multi_object_search/models/policy_model.py: -------------------------------------------------------------------------------- 1 | """Policy model for 2D Multi-Object Search domain. 2 | It is optional for the agent to be equipped with an occupancy 3 | grid map of the environment. 4 | """ 5 | 6 | import pomdp_py 7 | import random 8 | from pomdp_py.problems.multi_object_search.domain.action import * 9 | 10 | 11 | class PolicyModel(pomdp_py.RolloutPolicy): 12 | """Simple policy model. All actions are possible at any state.""" 13 | 14 | def __init__(self, robot_id, grid_map=None): 15 | """FindAction can only be taken after LookAction""" 16 | self.robot_id = robot_id 17 | self._grid_map = grid_map 18 | 19 | def sample(self, state, **kwargs): 20 | return random.sample(self._get_all_actions(**kwargs), 1)[0] 21 | 22 | def probability(self, action, state, **kwargs): 23 | raise NotImplementedError 24 | 25 | def argmax(self, state, **kwargs): 26 | """Returns the most likely action""" 27 | raise NotImplementedError 28 | 29 | def get_all_actions(self, state=None, history=None): 30 | """note: find can only happen after look.""" 31 | can_find = False 32 | if history is not None and len(history) > 1: 33 | # last action 34 | last_action = history[-1][0] 35 | if isinstance(last_action, LookAction): 36 | can_find = True 37 | find_action = [Find] if can_find else [] 38 | if state is None: 39 | return ALL_MOTION_ACTIONS + [Look] + find_action 40 | else: 41 | if self._grid_map is not None: 42 | valid_motions = self._grid_map.valid_motions( 43 | self.robot_id, state.pose(self.robot_id), ALL_MOTION_ACTIONS 44 | ) 45 | return list(valid_motions) + [Look] + find_action 46 | else: 47 | return ALL_MOTION_ACTIONS + [Look] + find_action 48 | 49 | def rollout(self, state, history=None): 50 | return random.sample(self.get_all_actions(state=state, history=history), 1)[0] 51 | -------------------------------------------------------------------------------- /pomdp_py/problems/rocksample/README.rst: -------------------------------------------------------------------------------- 1 | RockSample 2 | ========== 3 | 4 | Classic POMDP domain. 5 | 6 | Reference: 7 | 8 | * `Heuristic Search Value Iteration for POMDPs `_ 9 | 10 | 11 | pomdp_problems.rocksample.rocksample\_problem module 12 | ---------------------------------------------------- 13 | 14 | .. automodule:: pomdp_problems.rocksample.rocksample_problem 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | -------------------------------------------------------------------------------- /pomdp_py/problems/rocksample/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/rocksample/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/rocksample/cythonize/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/rocksample/cythonize/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/rocksample/cythonize/run_rocksample.py: -------------------------------------------------------------------------------- 1 | from rocksample_problem import main 2 | 3 | if __name__ == "__main__": 4 | main() 5 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/README.rst: -------------------------------------------------------------------------------- 1 | Tag 2 | === 3 | 4 | For description, see: 5 | 6 | * `Point-based value iteration: An anytime algorithm for POMDPs `_ 7 | The original Tag problem. 8 | 9 | * `DESPOT: Online POMDP Planning with Regularization `_. 10 | This includes "Laser Tag", an extension to original Tag. 11 | 12 | .. code-block:: 13 | 14 | python -m pomdp_py -r tag 15 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/agent/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/constants.py: -------------------------------------------------------------------------------- 1 | EPSILON = 1e-9 2 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/domain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/domain/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/domain/action.py: -------------------------------------------------------------------------------- 1 | """The Tag problem. Implemented according to the paper `Anytime Point-Based 2 | Approximations for Large POMDPs `_. 3 | 4 | Action space: The agent can take motion action and a tag action. 5 | """ 6 | 7 | # Reuses the actions in the multi object search domain 8 | import pomdp_py 9 | from pomdp_py.problems.multi_object_search.domain.action import ( 10 | Action, 11 | MotionAction, 12 | MoveEast2D, 13 | MoveWest2D, 14 | MoveSouth2D, 15 | MoveNorth2D, 16 | ) 17 | 18 | MOTION_ACTIONS = {MoveEast2D, MoveWest2D, MoveSouth2D, MoveNorth2D} 19 | 20 | 21 | class TagAction(Action): 22 | def __init__(self): 23 | super().__init__("tag") 24 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/domain/observation.py: -------------------------------------------------------------------------------- 1 | """The Tag problem. Implemented according to the paper `Anytime Point-Based 2 | Approximations for Large POMDPs `_. 3 | 4 | Observation space: the agent observes the target's location when the agent and 5 | the target are in the same cell. 6 | """ 7 | 8 | import pomdp_py 9 | 10 | 11 | class TagObservation(pomdp_py.Observation): 12 | def __init__(self, target_position): 13 | self.target_position = target_position 14 | 15 | def __hash__(self): 16 | return hash(self.target_position) 17 | 18 | def __eq__(self, other): 19 | if not isinstance(other, TagObservation): 20 | return False 21 | else: 22 | return self.target_position == other.target_position 23 | 24 | def __str__(self): 25 | return "Observation(%s)" % (str(self.target_position)) 26 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/domain/state.py: -------------------------------------------------------------------------------- 1 | """The Tag problem. Implemented according to the paper `Anytime Point-Based 2 | Approximations for Large POMDPs `_. 3 | 4 | State space: state of the robot (x,y), state of the person (x,y), person found. 5 | 6 | """ 7 | 8 | import pomdp_py 9 | 10 | 11 | class TagState(pomdp_py.State): 12 | def __init__(self, robot_position, target_position, target_found): 13 | """ 14 | robot_position (tuple): x,y location of the robot. 15 | target_position (tuple): x,y location of the target. 16 | target_found (bool): True if the target is found. 17 | """ 18 | self.robot_position = robot_position 19 | self.target_position = target_position 20 | self.target_found = target_found 21 | 22 | def __hash__(self): 23 | return hash((self.robot_position, self.target_position, self.target_found)) 24 | 25 | def __eq__(self, other): 26 | if not isinstance(other, TagState): 27 | return False 28 | else: 29 | return ( 30 | self.robot_position == other.robot_position 31 | and self.target_position == other.target_position 32 | and self.target_found == other.target_found 33 | ) 34 | 35 | def __str__(self): 36 | return "State(%s, %s | %s)" % ( 37 | str(self.robot_position), 38 | str(self.target_position), 39 | str(self.target_found), 40 | ) 41 | 42 | def __repr__(self): 43 | return str(self) 44 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/env/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/env/env.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | from pomdp_py.problems.tag.domain.state import * 3 | from pomdp_py.problems.tag.models.transition_model import * 4 | from pomdp_py.problems.tag.models.reward_model import * 5 | from pomdp_py.problems.tag.models.components.motion_policy import * 6 | from pomdp_py.problems.tag.models.components.grid_map import * 7 | from pomdp_py.problems.multi_object_search.env.env import interpret 8 | from pomdp_py.problems.multi_object_search.env.visual import MosViz 9 | 10 | 11 | class TagEnvironment(pomdp_py.Environment): 12 | def __init__(self, init_state, grid_map, pr_stay=0.2, small=1, big=10): 13 | self._grid_map = grid_map 14 | target_motion_policy = TagTargetMotionPolicy(grid_map, pr_stay) 15 | transition_model = TagTransitionModel(grid_map, target_motion_policy) 16 | reward_model = TagRewardModel(small=small, big=big) 17 | super().__init__(init_state, transition_model, reward_model) 18 | 19 | @property 20 | def width(self): 21 | return self._grid_map.width 22 | 23 | @property 24 | def length(self): 25 | return self._grid_map.length 26 | 27 | @property 28 | def grid_map(self): 29 | return self._grid_map 30 | 31 | @classmethod 32 | def from_str(cls, worldstr, **kwargs): 33 | dim, robots, objects, obstacles, _ = interpret(worldstr) 34 | assert len(robots) == 1, "Does not support multiple robots." 35 | robot_position = robots[list(robots.keys())[0]].pose[:2] 36 | targets = [] 37 | obstacle_poses = set({}) 38 | for objid in objects: 39 | if objid not in obstacles: 40 | targets.append(objid) 41 | else: 42 | obstacle_poses.add(objects[objid].pose) 43 | assert len(targets) == 1, "Does not support multiple objects." 44 | target_position = objects[targets[0]].pose 45 | init_state = TagState(robot_position, target_position, False) 46 | grid_map = GridMap(dim[0], dim[1], obstacle_poses) 47 | return TagEnvironment(init_state, grid_map, **kwargs) 48 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/example_worlds.py: -------------------------------------------------------------------------------- 1 | world0 = ( 2 | """ 3 | xxxxx...xx 4 | xxxxx...xx 5 | xxxxx...xx 6 | .....T.... 7 | r......... 8 | """, 9 | "r", 10 | ) 11 | 12 | world1 = ( 13 | """ 14 | x.Tx 15 | .... 16 | r... 17 | x..x 18 | """, 19 | "r", 20 | ) 21 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/experiment.py: -------------------------------------------------------------------------------- 1 | """Simple experiment to get mean""" 2 | 3 | from pomdp_py.problems.tag.problem import * 4 | import numpy as np 5 | 6 | 7 | def trial(worldstr, **kwargs): 8 | grid_map = GridMap.from_str(worldstr) 9 | free_cells = grid_map.free_cells() 10 | init_robot_position = random.sample(free_cells, 1)[0] 11 | init_target_position = random.sample(free_cells, 1)[0] 12 | 13 | problem = TagProblem(init_robot_position, init_target_position, grid_map, **kwargs) 14 | discounted_reward = solve( 15 | problem, 16 | max_depth=15, 17 | discount_factor=0.95, 18 | planning_time=0.7, 19 | exploration_const=10, 20 | visualize=True, 21 | max_time=120, 22 | max_steps=500, 23 | ) 24 | return discounted_reward 25 | 26 | 27 | def main(): 28 | all_rewards = [] 29 | try: 30 | for i in range(100): 31 | dr = trial(world0[0], pr_stay=0.5, small=1, big=10, prior="uniform") 32 | all_rewards.append(dr) 33 | finally: 34 | print("All done!") 35 | print("---------") 36 | print("Average discounted reward: %.3f" % (np.mean(all_rewards))) 37 | print("Std.dev discounted reward: %.3f" % (np.std(all_rewards))) 38 | 39 | 40 | if __name__ == "__main__": 41 | main() 42 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/models/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/components/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tag/models/components/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/components/grid_map.py: -------------------------------------------------------------------------------- 1 | from pomdp_py.problems.tag.domain.action import * 2 | from pomdp_py.problems.tag.models.transition_model import TagTransitionModel 3 | from pomdp_py.problems.multi_object_search.env.env import interpret 4 | 5 | 6 | class GridMap: 7 | def __init__(self, width, length, obstacle_poses): 8 | self.width = width 9 | self.length = length 10 | # set of obstacle poses 11 | self.obstacle_poses = obstacle_poses 12 | 13 | def valid_pose(self, position): 14 | if not ( 15 | position[0] >= 0 16 | and position[0] < self.width 17 | and position[1] >= 0 18 | and position[1] < self.length 19 | ): 20 | return False 21 | if position in self.obstacle_poses: 22 | return False 23 | return True 24 | 25 | def valid_motions(self, position, all_motions=MOTION_ACTIONS): 26 | valid_motions = set({}) 27 | for motion_action in all_motions: 28 | if TagTransitionModel.if_move_by(self, position, motion_action) == position: 29 | continue 30 | valid_motions.add(motion_action) 31 | return valid_motions 32 | 33 | @classmethod 34 | def from_str(cls, worldstr, **kwargs): 35 | dim, _, objects, obstacles, _ = interpret(worldstr) 36 | obstacle_poses = set({}) 37 | for objid in objects: 38 | if objid in obstacles: 39 | obstacle_poses.add(objects[objid].pose) 40 | grid_map = GridMap(dim[0], dim[1], obstacle_poses) 41 | return grid_map 42 | 43 | def free_cells(self): 44 | cells = set( 45 | { 46 | (x, y) 47 | for x in range(self.width) 48 | for y in range(self.length) 49 | if (x, y) not in self.obstacle_poses 50 | } 51 | ) 52 | return cells 53 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/observation_model.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | from pomdp_py.problems.tag.domain.observation import * 3 | import pomdp_py.problems.tag.constants as constants 4 | 5 | 6 | class TagObservationModel(pomdp_py.ObservationModel): 7 | """In this observation model, the robot deterministically 8 | observes the target location when it is in the same grid cell 9 | as the target. Ohterwise the robot does not observe anything.""" 10 | 11 | def probability(self, observation, next_state, action, **kwargs): 12 | if next_state.robot_position == next_state.target_position: 13 | if observation.target_position is None: 14 | return constants.EPSILON 15 | else: 16 | if observation.target_position == next_state.target_position: 17 | return 1.0 - constants.EPSILON 18 | else: 19 | return constants.EPSILON 20 | else: 21 | if observation.target_position is None: 22 | return 1.0 - constants.EPSILON 23 | else: 24 | return constants.EPSILON 25 | 26 | def sample(self, next_state, action): 27 | """There is no stochaisticity in the observation model""" 28 | if next_state.robot_position == next_state.target_position: 29 | return TagObservation(next_state.target_position) 30 | else: 31 | return TagObservation(None) 32 | 33 | def argmax(self, next_state, action): 34 | return self.sample(next_state, action) 35 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/policy_model.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | import random 3 | from pomdp_py.problems.tag.domain.action import * 4 | from pomdp_py.problems.tag.models.transition_model import * 5 | 6 | 7 | class TagPolicyModel(pomdp_py.RolloutPolicy): 8 | def __init__(self, grid_map=None): 9 | self._grid_map = grid_map 10 | 11 | def sample(self, state, **kwargs): 12 | return random.sample(self.get_all_actions(state, **kwargs), 1)[0] 13 | 14 | def get_all_actions(self, state=None, history=None): 15 | if state is not None: 16 | if self._grid_map is not None: 17 | valid_motions = self._grid_map.valid_motions( 18 | state.robot_position, all_motions=MOTION_ACTIONS 19 | ) 20 | return valid_motions | set({TagAction()}) 21 | return MOTION_ACTIONS | set({TagAction()}) 22 | 23 | def rollout(self, state, history=None): 24 | return random.sample(self.get_all_actions(state=state, history=history), 1)[0] 25 | -------------------------------------------------------------------------------- /pomdp_py/problems/tag/models/reward_model.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | from pomdp_py.problems.tag.domain.action import * 3 | 4 | 5 | class TagRewardModel(pomdp_py.RewardModel): 6 | def __init__(self, small=1, big=10): 7 | self.small = small 8 | self.big = big 9 | 10 | def probability( 11 | self, reward, state, action, next_state, normalized=False, **kwargs 12 | ): 13 | if reward == self._reward_func(state, action): 14 | return 1.0 15 | else: 16 | return 0.0 17 | 18 | def sample(self, state, action, next_state): 19 | # deterministic 20 | return self._reward_func(state, action, next_state) 21 | 22 | def _reward_func(self, state, action, next_state): 23 | if isinstance(action, MotionAction): 24 | return -self.small 25 | else: 26 | # Tag action 27 | assert isinstance(action, TagAction) 28 | if next_state.target_position == next_state.robot_position: 29 | if next_state.target_found: 30 | return self.big 31 | return -self.big 32 | -------------------------------------------------------------------------------- /pomdp_py/problems/tiger/README.rst: -------------------------------------------------------------------------------- 1 | Tiger 2 | ===== 3 | 4 | Classic problem from `Planning and acting in partially observable stochastic 5 | domains `_ 6 | 7 | Refer to :doc:`examples.tiger` for more details. 8 | -------------------------------------------------------------------------------- /pomdp_py/problems/tiger/__init__.py: -------------------------------------------------------------------------------- 1 | from .tiger_problem import TigerProblem, test_planner, make_tiger 2 | -------------------------------------------------------------------------------- /pomdp_py/problems/tiger/cythonize/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/problems/tiger/cythonize/__init__.py -------------------------------------------------------------------------------- /pomdp_py/problems/tiger/cythonize/run_tiger.py: -------------------------------------------------------------------------------- 1 | from tiger_problem import main 2 | 3 | if __name__ == "__main__": 4 | main() 5 | -------------------------------------------------------------------------------- /pomdp_py/representations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/representations/__init__.py -------------------------------------------------------------------------------- /pomdp_py/representations/belief/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/representations/belief/__init__.py -------------------------------------------------------------------------------- /pomdp_py/representations/belief/particles.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.representations.distribution.particles cimport Particles 2 | from pomdp_py.framework.basics cimport State, Action, Observation, Agent,\ 3 | TransitionModel, ObservationModel, BlackboxModel 4 | 5 | cpdef particle_reinvigoration(Particles particles, int num_particles, state_transform_func=*) 6 | cpdef update_particles_belief(Particles current_particles, Action real_action, Observation real_observation=*, ObservationModel observation_model=*, TransitionModel transition_model=*, BlackboxModel blackbox_model=*, state_transform_func=*) 7 | -------------------------------------------------------------------------------- /pomdp_py/representations/distribution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h2r/pomdp-py/46f9132c387ae11111d986fc74ebfc597c8f1d5f/pomdp_py/representations/distribution/__init__.py -------------------------------------------------------------------------------- /pomdp_py/representations/distribution/gaussian.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport GenerativeDistribution 2 | 3 | cdef class Gaussian(GenerativeDistribution): 4 | cdef list _mean 5 | cdef list _cov 6 | -------------------------------------------------------------------------------- /pomdp_py/representations/distribution/histogram.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport GenerativeDistribution 2 | 3 | cdef class Histogram(GenerativeDistribution): 4 | cdef dict _histogram 5 | -------------------------------------------------------------------------------- /pomdp_py/representations/distribution/particles.pxd: -------------------------------------------------------------------------------- 1 | from pomdp_py.framework.basics cimport GenerativeDistribution 2 | 3 | cdef class WeightedParticles(GenerativeDistribution): 4 | cdef list _particles 5 | cdef list _values 6 | cdef list _weights 7 | cdef str _approx_method 8 | cdef object _distance_func 9 | cdef dict _hist 10 | cdef bint _hist_valid 11 | cdef bint _frozen 12 | cdef int _hashcode 13 | 14 | cpdef dict get_histogram(self) 15 | 16 | cdef class Particles(WeightedParticles): 17 | pass 18 | -------------------------------------------------------------------------------- /pomdp_py/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Assorted convenient functions 2 | from pomdp_py.utils.math import ( 3 | vec, 4 | proj, 5 | R_x, 6 | R_y, 7 | R_z, 8 | R_between, 9 | T, 10 | to_radians, 11 | approx_equal, 12 | ) 13 | from pomdp_py.utils.misc import remap, json_safe, safe_slice, similar, special_char 14 | from pomdp_py.utils.colors import ( 15 | lighter, 16 | rgb_to_hex, 17 | hex_to_rgb, 18 | inverse_color_rgb, 19 | inverse_color_hex, 20 | random_unique_color, 21 | ) 22 | from pomdp_py.utils import typ 23 | from pomdp_py.utils.debugging import TreeDebugger 24 | -------------------------------------------------------------------------------- /pomdp_py/utils/colors.py: -------------------------------------------------------------------------------- 1 | """Utilities for dealing with colors""" 2 | 3 | import numpy as np 4 | import random 5 | 6 | 7 | # colors 8 | def lighter(color, percent): 9 | """assumes color is rgb between (0, 0, 0) and (255, 255, 255)""" 10 | color = np.array(color) 11 | white = np.array([255, 255, 255]) 12 | vector = white - color 13 | return color + vector * percent 14 | 15 | 16 | def rgb_to_hex(rgb): 17 | r, g, b = rgb 18 | return "#%02x%02x%02x" % (int(r), int(g), int(b)) 19 | 20 | 21 | def hex_to_rgb(hx): 22 | """hx is a string, begins with #. ASSUME len(hx)=7.""" 23 | if len(hx) != 7: 24 | raise ValueError("Hex must be #------") 25 | hx = hx[1:] # omit the '#' 26 | r = int("0x" + hx[:2], 16) 27 | g = int("0x" + hx[2:4], 16) 28 | b = int("0x" + hx[4:6], 16) 29 | return (r, g, b) 30 | 31 | 32 | def inverse_color_rgb(rgb): 33 | r, g, b = rgb 34 | return (255 - r, 255 - g, 255 - b) 35 | 36 | 37 | def inverse_color_hex(hx): 38 | """hx is a string, begins with #. ASSUME len(hx)=7.""" 39 | return inverse_color_rgb(hex_to_rgb(hx)) 40 | 41 | 42 | def random_unique_color(colors, ctype=1): 43 | """ 44 | ctype=1: completely random 45 | ctype=2: red random 46 | ctype=3: blue random 47 | ctype=4: green random 48 | ctype=5: yellow random 49 | """ 50 | if ctype == 1: 51 | color = "#%06x" % random.randint(0x444444, 0x999999) 52 | while color in colors: 53 | color = "#%06x" % random.randint(0x444444, 0x999999) 54 | elif ctype == 2: 55 | color = "#%02x0000" % random.randint(0xAA, 0xFF) 56 | while color in colors: 57 | color = "#%02x0000" % random.randint(0xAA, 0xFF) 58 | elif ctype == 4: # green 59 | color = "#00%02x00" % random.randint(0xAA, 0xFF) 60 | while color in colors: 61 | color = "#00%02x00" % random.randint(0xAA, 0xFF) 62 | elif ctype == 3: # blue 63 | color = "#0000%02x" % random.randint(0xAA, 0xFF) 64 | while color in colors: 65 | color = "#0000%02x" % random.randint(0xAA, 0xFF) 66 | elif ctype == 5: # yellow 67 | h = random.randint(0xAA, 0xFF) 68 | color = "#%02x%02x00" % (h, h) 69 | while color in colors: 70 | h = random.randint(0xAA, 0xFF) 71 | color = "#%02x%02x00" % (h, h) 72 | else: 73 | raise ValueError("Unrecognized color type %s" % (str(ctype))) 74 | return color 75 | -------------------------------------------------------------------------------- /pomdp_py/utils/cython_utils.pxd: -------------------------------------------------------------------------------- 1 | cpdef det_dict_hash(dct, keep=*) 2 | -------------------------------------------------------------------------------- /pomdp_py/utils/cython_utils.pyx: -------------------------------------------------------------------------------- 1 | """Utility functions for Cython code.""" 2 | 3 | import hashlib 4 | 5 | cpdef det_dict_hash(dct, keep=9): 6 | """Deterministic hash of a dictionary without sorting.""" 7 | hash_accumulator = 0 8 | for key, value in dct.items(): 9 | pair_str = f"{key}:{value}".encode() 10 | pair_hash = hashlib.sha1(pair_str).hexdigest() 11 | hash_accumulator += int(pair_hash, 16) 12 | 13 | # Convert the accumulated hash back to a string, take the first 'keep' digits, and convert to an integer 14 | hashcode = int(str(hash_accumulator)[:keep]) 15 | return hashcode 16 | -------------------------------------------------------------------------------- /pomdp_py/utils/interfaces/__init__.py: -------------------------------------------------------------------------------- 1 | """Utilities for interfacing with external libraries""" 2 | -------------------------------------------------------------------------------- /pomdp_py/utils/misc.py: -------------------------------------------------------------------------------- 1 | """Misc Python utilities""" 2 | 3 | from difflib import SequenceMatcher 4 | 5 | 6 | def remap(oldvalue, oldmin, oldmax, newmin, newmax): 7 | if oldmax - oldmin == 0: 8 | print("Warning in remap: the old range has size 0") 9 | oldmax = oldmin + oldvalue 10 | return (((oldvalue - oldmin) * (newmax - newmin)) / (oldmax - oldmin)) + newmin 11 | 12 | 13 | def json_safe(obj): 14 | if isinstance(obj, bool): 15 | return str(obj).lower() 16 | elif isinstance(obj, (list, tuple)): 17 | return [json_safe(item) for item in obj] 18 | elif isinstance(obj, dict): 19 | return {json_safe(key): json_safe(value) for key, value in obj.items()} 20 | else: 21 | return str(obj) 22 | return obj 23 | 24 | 25 | def safe_slice(arr, start, end): 26 | true_start = max(0, min(len(arr) - 1, start)) 27 | true_end = max(0, min(len(arr) - 1, end)) 28 | return arr[true_start:true_end] 29 | 30 | 31 | def similar(a, b): 32 | # Reference: https://stackoverflow.com/questions/17388213/find-the-similarity-metric-between-two-strings 33 | return SequenceMatcher(None, a, b).ratio() 34 | 35 | 36 | class special_char: 37 | left = "\u2190" 38 | up = "\u2191" 39 | right = "\u2192" 40 | down = "\u2193" 41 | longleft = "\u27f5" 42 | longright = "\u27f6" 43 | 44 | hline = "─" 45 | vline = "│" 46 | 47 | bottomleft = "└" 48 | longbottomleft = "└─" 49 | topleft = "┌" 50 | longtopleft = "┌─" 51 | topright = "┐" 52 | longtopright = "─┐" 53 | bottomright = "┘" 54 | longbottomright = "─┘" 55 | 56 | intersect = "┼" 57 | topt = "┬" 58 | leftt = "├" 59 | rightt = "┤" 60 | bottomt = "┴" 61 | shadebar = "▒" 62 | 63 | SUBSCRIPT = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉") 64 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel", "Cython>=3.0.8"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "pomdp-py" 7 | version = "1.3.5.1" 8 | description = "Python POMDP Library." 9 | authors = [{name = "Kaiyu Zheng", email = "kzheng10@cs.brown.edu"}] 10 | license = {file = "LICENSE"} 11 | readme = "README.rst" 12 | keywords = ["Partially Observable Markov Decision Process", "POMDP"] 13 | classifiers = [ 14 | "Development Status :: 4 - Beta", 15 | "Intended Audience :: Developers", 16 | "Intended Audience :: Science/Research", 17 | "License :: OSI Approved :: MIT License", 18 | "Operating System :: OS Independent", 19 | "Programming Language :: Python", 20 | "Programming Language :: Cython", 21 | "Topic :: Scientific/Engineering" 22 | 23 | ] 24 | dependencies = [ 25 | "numpy>=1.18.0", 26 | "scipy>=1.6.0", 27 | "tqdm>=4.55.0" 28 | ] 29 | 30 | # optional dependencies for examples in pomdp_problems 31 | [project.optional-dependencies] 32 | problems = [ 33 | "matplotlib>=3.2.0", # for some utilities 34 | "pygame>=2.0.2", # for some tests 35 | "opencv-python>=4.5.2.0" # for some tests 36 | ] 37 | 38 | [project.urls] 39 | Home = "https://github.com/h2r/pomdp-py" 40 | 41 | [tool.ruff] 42 | # Exclude a variety of commonly ignored directories. 43 | exclude = [ 44 | ".direnv", 45 | ".eggs", 46 | ".git", 47 | ".git-rewrite", 48 | ".hg", 49 | ".mypy_cache", 50 | ".nox", 51 | ".pants.d", 52 | ".pytype", 53 | ".ruff_cache", 54 | ".svn", 55 | ".tox", 56 | ".venv", 57 | "__pypackages__", 58 | "_build", 59 | "buck-out", 60 | "build", 61 | "dist", 62 | "node_modules", 63 | "venv", 64 | "docs", 65 | ".rst", 66 | ".bib", 67 | ".html" 68 | ] 69 | 70 | [tool.black] 71 | line-length = 88 72 | target-version = ["py38", "py39", "py310", "py311", "py312"] 73 | include = "\\.(py|pyx|pxd|pyi)$" 74 | preview = true 75 | force-exclude = ''' 76 | /( 77 | docs 78 | )/ 79 | ''' 80 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup, Extension, find_packages 4 | from Cython.Build import cythonize 5 | import os.path 6 | 7 | 8 | with open("README.rst", "r") as f: 9 | long_description = f.read() 10 | 11 | 12 | # Build cython files as extensions 13 | def build_extensions(pkg_name, major_submodules): 14 | cwd = os.path.abspath(os.path.dirname(__file__)) 15 | extensions = [] 16 | for subm in major_submodules: 17 | for f in os.listdir(os.path.join(cwd, pkg_name, subm.replace(".", "/"))): 18 | if f.endswith(".pyx"): 19 | filename = os.path.splitext(f)[0] 20 | ext_name = f"{pkg_name}.{subm}.{filename}" 21 | ext_path = os.path.join(pkg_name, subm.replace(".", "/"), f) 22 | extensions.append(Extension(ext_name, [ext_path])) 23 | 24 | return extensions 25 | 26 | 27 | extensions = build_extensions( 28 | "pomdp_py", 29 | [ 30 | "framework", 31 | "algorithms", 32 | "utils", 33 | "representations.distribution", 34 | "representations.belief", 35 | "problems.tiger.cythonize", 36 | "problems.rocksample.cythonize", 37 | ], 38 | ) 39 | 40 | setup( 41 | ext_modules=cythonize( 42 | extensions, build_dir="build", compiler_directives={"language_level": "3"} 43 | ), 44 | packages=find_packages(exclude=["thirdparty", "thirdparty.*"]), 45 | package_data={ 46 | "pomdp_py": ["*.pxd", "*.pyx", "*.so", "*.c"], 47 | }, 48 | zip_safe=False, 49 | ) 50 | -------------------------------------------------------------------------------- /tests/test_all.py: -------------------------------------------------------------------------------- 1 | # Run all tests 2 | 3 | import os 4 | import sys 5 | import argparse 6 | import importlib 7 | import time 8 | from pomdp_py.utils import typ 9 | 10 | ABS_DIR = os.path.dirname(os.path.abspath(__file__)) 11 | sys.path.append(ABS_DIR) 12 | 13 | 14 | def main(): 15 | parser = argparse.ArgumentParser(description="Running tests.") 16 | args = parser.parse_args() 17 | 18 | # load the test modules 19 | tests = [] 20 | for fname in sorted(os.listdir(ABS_DIR)): 21 | if ( 22 | fname != "test_all.py" 23 | and fname.startswith("test") 24 | and fname.endswith(".py") 25 | ): 26 | test_module = importlib.import_module(fname.split(".py")[0]) 27 | tests.append(test_module) 28 | 29 | for i, test_module in enumerate(tests): 30 | print(typ.bold("[{}/{}] {}".format(i + 1, len(tests), test_module.description))) 31 | 32 | old_stdout = sys.stdout 33 | try: 34 | test_module.run() 35 | except FileNotFoundError as ex: 36 | sys.stdout = old_stdout 37 | print(" Error:", str(ex)) 38 | 39 | 40 | if __name__ == "__main__": 41 | main() 42 | -------------------------------------------------------------------------------- /tests/test_conversion_pomdpx.py: -------------------------------------------------------------------------------- 1 | # Tests the conversion to .pomdpx file format code 2 | 3 | import sys 4 | from pomdp_py.utils.interfaces.conversion import to_pomdpx_file 5 | from pomdp_py.problems.tiger import make_tiger 6 | import os 7 | 8 | description = "testing conversion to .pomdpx file" 9 | 10 | 11 | def test_pomdpx_file_conversion(pomdpconvert_path): 12 | """ 13 | test pomdpx file conversion. 14 | If pomdp file conversion works, and .pomdpx file is created, 15 | then we assume the .pomdpx file is correct (because it is 16 | converted using an external software). 17 | """ 18 | print("[testing] test_pomdpx_file_conversion") 19 | tiger = make_tiger() 20 | 21 | filename = "./test_tiger.POMDPX" 22 | print("[testing] converting to .pomdpx file") 23 | to_pomdpx_file( 24 | tiger.agent, pomdpconvert_path, output_path=filename, discount_factor=0.95 25 | ) 26 | assert os.path.exists(filename), ".pomdpx file not created." 27 | print("Pass.") 28 | 29 | # Remove file 30 | os.remove(filename) 31 | 32 | 33 | def _check_pomdpconvert(): 34 | pomdpconvert_path = os.getenv("POMDPCONVERT_PATH") 35 | if pomdpconvert_path is None or not os.path.exists(pomdpconvert_path): 36 | raise FileNotFoundError( 37 | "To run this test, download sarsop from " 38 | "https://github.com/AdaCompNUS/sarsop. Then, follow the " 39 | "instructions on this web page to compile this software. " 40 | "Finally, set the environment variable POMDPCONVERT_PATH " 41 | "to be the path to the pomdpconvert binary file " 42 | "generated after compilation, likely located at " 43 | "/path/to/sarsop/src/pomdpconvert" 44 | ) 45 | return pomdpconvert_path 46 | 47 | 48 | def run(): 49 | pomdpconvert_path = _check_pomdpconvert() 50 | test_pomdpx_file_conversion(pomdpconvert_path) 51 | 52 | 53 | if __name__ == "__main__": 54 | run() 55 | -------------------------------------------------------------------------------- /tests/test_framework_basics.py: -------------------------------------------------------------------------------- 1 | import pomdp_py 2 | 3 | description = "testing framework basics" 4 | 5 | TRANSITION = pomdp_py.TabularTransitionModel( 6 | { 7 | # state, action, next_state 8 | ("hungry", "eat", "full"): 0.7, 9 | ("hungry", "eat", "hungry"): 0.3, 10 | ("hungry", "sleep", "full"): 0.01, 11 | ("hungry", "sleep", "hungry"): 0.99, 12 | ("full", "eat", "full"): 0.9, 13 | ("full", "eat", "hungry"): 0.1, 14 | ("full", "sleep", "full"): 0.5, 15 | ("full", "sleep", "hungry"): 0.5, 16 | } 17 | ) 18 | 19 | 20 | def test_agent_set_model() -> None: 21 | b0 = pomdp_py.Histogram({"hungry": 0.5, "full": 0.5}) 22 | 23 | # test that agent can be created with incomplete models 24 | # and we can set the agent's model after its creation 25 | agent = pomdp_py.Agent(b0) 26 | 27 | agent.set_models(transition_model=TRANSITION) 28 | # next_state, state, action 29 | assert agent.transition_model.probability("full", "hungry", "eat") == 0.7 30 | 31 | policy = pomdp_py.UniformPolicyModel(["eat", "sleep"]) 32 | agent.set_models(policy_model=policy) 33 | assert agent.policy_model.sample(b0.random()) in ["eat", "sleep"] 34 | 35 | 36 | def test_env_set_model() -> None: 37 | # test that agent can be created with incomplete models 38 | # and we can set the agent's model after its creation 39 | env = pomdp_py.Environment(pomdp_py.SimpleState("hungry")) 40 | env.set_models(transition_model=TRANSITION) 41 | # next_state, state, action 42 | assert env.transition_model.probability("full", "hungry", "eat") == 0.7 43 | 44 | 45 | def run() -> None: 46 | test_agent_set_model() 47 | test_env_set_model() 48 | 49 | 50 | if __name__ == "__main__": 51 | run() 52 | -------------------------------------------------------------------------------- /tests/test_tree_debugger.py: -------------------------------------------------------------------------------- 1 | import random 2 | from pomdp_py.problems.tiger import TigerProblem, test_planner 3 | import pomdp_py 4 | from pomdp_py.utils.debugging import TreeDebugger 5 | 6 | description = "testing pomdp_py.utils.TreeDebugger" 7 | 8 | 9 | def test_tree_debugger_tiger(debug_tree=False): 10 | tiger_problem = TigerProblem.create("tiger-left", 0.5, 0.15) 11 | pouct = pomdp_py.POUCT( 12 | max_depth=4, 13 | discount_factor=0.95, 14 | num_sims=4096, 15 | exploration_const=200, 16 | rollout_policy=tiger_problem.agent.policy_model, 17 | ) 18 | 19 | pouct.plan(tiger_problem.agent) 20 | dd = TreeDebugger(tiger_problem.agent.tree) 21 | 22 | # The number of VNodes equals to the sum of VNodes per layer 23 | assert dd.nv == sum([len(dd.l(i)) for i in range(dd.nl)]) 24 | 25 | # The total number of nodes equal to the number of VNodes plus QNodes 26 | assert dd.nn == dd.nv + dd.nq 27 | 28 | # Test example usage 29 | dd.mark(dd.path(dd.layer(2)[0])) 30 | print("Printing tree up to depth 1") 31 | dd.p(1) 32 | 33 | # There exists a path from the root to nodes in the tree 34 | for i in range(dd.nl): 35 | n = dd.l(i)[0] 36 | path = dd.path_to(n) 37 | assert path is not None 38 | 39 | test_planner(tiger_problem, pouct, nsteps=3, debug_tree=debug_tree) 40 | 41 | 42 | def run(verbose=False, debug_tree=False): 43 | test_tree_debugger_tiger(debug_tree=debug_tree) 44 | 45 | 46 | if __name__ == "__main__": 47 | run(debug_tree=True) 48 | --------------------------------------------------------------------------------