Metadata-Version: 2.1
Name: language_world
Version: 0.1.1
Summary: A robotics and language benchmark
Author-email: "K.R. Zentner" <krzentner@gmail.com>
License: MIT License
        
        Copyright (c) 2023 K.R. Zentner
        
        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:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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.
        
Project-URL: Homepage, https://github.com/krzentner/language-world
Project-URL: Bug Reports, https://github.com/krzentner/language-world/issues
Project-URL: Source, https://github.com/krzentner/language-world
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22

# Language-World

A language and robotics benchmark based on [Meta-World](https://github.com/Farama-Foundation/Metaworld).

Language-World is packaged as a set of small tools which process Meta-World observations.
Wrapping Meta-World environments directly is left up to the user.
To avoid confusion, please always use the goal-observable, randomized goal and initial state variation of Meta-World (MT50-rand), and always sample length 500 episodes.
If you choose not to, please prominently document what configuration you used instead.

Language-World can be installed via pip:

```
pip install git+https://github.com/krzentner/language-world.git@v0.1.0
```

Alternatively, copy [this file](./src/language_world/__init__.py) into your project.

Language-World consists of three main components:

First, a set of natural language task descriptions available as a dictionary: `language_world.TASK_DESCRIPTIONS: dict[str, str]`

Second, a set of "scripted skills," that can be used to solve MT10 (and also function in other tasks).

`language_world.SCRIPTED_SKILL_NAMES: list[str]` lists the names of all scripted skills.
`language_world.run_scripted_skill(skill_name: str, obs: np.ndarray) -> np.ndarray` produces an action given a skill name and observation.

Thirdly, a query answering function:

```
language_world.eval_queries(task_name: str, queries: List[str],
                            obs: np.ndarray, fuzzy: bool=False)
```

The query answering function can evaluate a large number of queries.
Enabling the `fuzzy` flag will map unsupported queries to the nearest supported queries using string edit distance.

`language_world.enumerate_base_queries(task_name: str) -> list[str]` provides a list of the "base" queries for a task (i.e. those that do not contain conjunctions).

`language_world.enumerate_all_queries(task_name: str) -> list[str]` provides a list of all queries for a task.
