Name | miniwob JSON |
Version |
1.0
JSON |
| download |
home_page | |
Summary | A web interaction benchmark for reinforcement learning. |
upload_time | 2023-08-14 17:15:38 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License |
keywords |
reinforcement learning
game
rl
ai
gymnasium
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img src="https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/master/miniwobplusplus-text.png" width="500px"/>
</p>
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
<p align="center">
<img src="https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/master/docs/_static/img/showcase-static.png" width="100%"/>
</p>
The MiniWoB++ (Mini World of Bits++) library contains a collection of over 100 **web interaction environments**,
along with JavaScript and Python interfaces for programmatically interacting with them.
The Python interface follows the [Gymnasium](https://gymnasium.farama.org/) API
and uses [Selenium WebDriver](https://www.selenium.dev/documentation/webdriver/)
to perform actions on the web browser.
MiniWoB++ is an extension of the
[OpenAI MiniWoB benchmark](http://proceedings.mlr.press/v70/shi17a/shi17a.pdf),
and was introduced in the paper
[Reinforcement Learning on Web Interfaces using Workflow-Guided
Exploration](https://arxiv.org/abs/1802.08802).
The documentation website is at [miniwob.farama.org](https://miniwob.farama.org/).
Development on MiniWoB++ is currently ongoing to bring it up to [Farama Standards](https://farama.org/project_standards.html) for mature projects, and will be maintained long term after this point. See the [Project Roadmap](https://github.com/Farama-Foundation/miniwob-plusplus/issues/58) for more details. If you'd like to help out, you can join our discord server here: <https://discord.gg/PfR7a79FpQ>.
# Installation
MiniWoB++ supports Python 3.8+ on Linux and macOS.
## Installing the MiniWoB++ Library
To install the MiniWoB++ library, use `pip install miniwob`.
## Installing Chrome/Chromium and ChromeDriver
We strongly recommend using Chrome or Chromium as the web browser,
as other browsers may render the environments differently.
The MiniWoB++ Python interface uses [Selenium](https://www.selenium.dev/documentation/webdriver/),
which interacts with the browser via the [WebDriver API](https://w3c.github.io/webdriver/).
Follow one of the
[instruction methods](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/)
to install ChromeDriver. The simplest method is to
[download](https://chromedriver.chromium.org/downloads) ChromeDriver with the matching version,
unzip it, and then add the directory containing the `chromedriver` executable to the `PATH` environment variable:
```sh
export PATH=$PATH:/path/to/chromedriver
```
For Chromium, the driver may also be available in a software package; for example, in Debian/Ubuntu:
```sh
sudo apt install chromium-driver
```
# Example Usage
The following code performs a deterministic action on the
[`click-test-2`](http://miniwob.farama.org/environments/click-test-2/) environment.
```python
import time
import gymnasium
from miniwob.action import ActionTypes
env = gymnasium.make('miniwob/click-test-2-v1', render_mode='human')
# Wrap the code in try-finally to ensure proper cleanup.
try:
# Start a new episode.
obs, info = env.reset()
assert obs["utterance"] == "Click button ONE."
assert obs["fields"] == (("target", "ONE"),)
time.sleep(2) # Only here to let you look at the environment.
# Find the HTML element with text "ONE".
for element in obs["dom_elements"]:
if element["text"] == "ONE":
break
# Click on the element.
action = env.unwrapped.create_action(ActionTypes.CLICK_ELEMENT, ref=element["ref"])
obs, reward, terminated, truncated, info = env.step(action)
# Check if the action was correct.
print(reward) # Should be around 0.8 since 2 seconds has passed.
assert terminated is True
time.sleep(2)
finally:
env.close()
```
See [the documentation](http://miniwob.farama.org/content/basic_usage/) for more information.
# Environments
The list of the environments that were included in the MiniWoB++ library can be found in the
[documentation](http://miniwob.farama.org/environments/list/).
All environments share the same [observation space](http://miniwob.farama.org/content/observation_space/),
while the [action space](http://miniwob.farama.org/content/action_space/) can be configured during environment construction.
# Citation
To cite this project please use:
```bibtex
@inproceedings{liu2018reinforcement,
author = {Evan Zheran Liu and Kelvin Guu and Panupong Pasupat and Tianlin Shi and Percy Liang},
title = {Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration},
booktitle = {International Conference on Learning Representations ({ICLR})},
url = {https://arxiv.org/abs/1802.08802},
year = {2018},
}
```
Raw data
{
"_id": null,
"home_page": "",
"name": "miniwob",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "Reinforcement Learning,game,RL,AI,gymnasium",
"author": "",
"author_email": "Farama Foundation <contact@farama.org>",
"download_url": "https://files.pythonhosted.org/packages/69/3f/0d6b99f2c240823549e1fbe266d1dc9df87017271e3f5733f65839f0ec5e/miniwob-1.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/master/miniwobplusplus-text.png\" width=\"500px\"/>\n</p>\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/master/docs/_static/img/showcase-static.png\" width=\"100%\"/>\n</p>\n\nThe MiniWoB++ (Mini World of Bits++) library contains a collection of over 100 **web interaction environments**,\nalong with JavaScript and Python interfaces for programmatically interacting with them.\nThe Python interface follows the [Gymnasium](https://gymnasium.farama.org/) API\nand uses [Selenium WebDriver](https://www.selenium.dev/documentation/webdriver/)\nto perform actions on the web browser. \n\nMiniWoB++ is an extension of the\n[OpenAI MiniWoB benchmark](http://proceedings.mlr.press/v70/shi17a/shi17a.pdf),\nand was introduced in the paper\n[Reinforcement Learning on Web Interfaces using Workflow-Guided\nExploration](https://arxiv.org/abs/1802.08802).\n\nThe documentation website is at [miniwob.farama.org](https://miniwob.farama.org/).\nDevelopment on MiniWoB++ is currently ongoing to bring it up to [Farama Standards](https://farama.org/project_standards.html) for mature projects, and will be maintained long term after this point. See the [Project Roadmap](https://github.com/Farama-Foundation/miniwob-plusplus/issues/58) for more details. If you'd like to help out, you can join our discord server here: <https://discord.gg/PfR7a79FpQ>.\n\n# Installation\n\nMiniWoB++ supports Python 3.8+ on Linux and macOS.\n\n## Installing the MiniWoB++ Library\n\nTo install the MiniWoB++ library, use `pip install miniwob`.\n\n## Installing Chrome/Chromium and ChromeDriver\n\nWe strongly recommend using Chrome or Chromium as the web browser,\nas other browsers may render the environments differently.\n\nThe MiniWoB++ Python interface uses [Selenium](https://www.selenium.dev/documentation/webdriver/),\nwhich interacts with the browser via the [WebDriver API](https://w3c.github.io/webdriver/).\nFollow one of the\n[instruction methods](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/)\nto install ChromeDriver. The simplest method is to\n[download](https://chromedriver.chromium.org/downloads) ChromeDriver with the matching version,\nunzip it, and then add the directory containing the `chromedriver` executable to the `PATH` environment variable:\n\n```sh\nexport PATH=$PATH:/path/to/chromedriver\n```\n\nFor Chromium, the driver may also be available in a software package; for example, in Debian/Ubuntu:\n\n```sh\nsudo apt install chromium-driver\n```\n\n# Example Usage\n\nThe following code performs a deterministic action on the\n[`click-test-2`](http://miniwob.farama.org/environments/click-test-2/) environment. \n\n```python\nimport time\nimport gymnasium\nfrom miniwob.action import ActionTypes\n\nenv = gymnasium.make('miniwob/click-test-2-v1', render_mode='human')\n\n# Wrap the code in try-finally to ensure proper cleanup.\ntry:\n # Start a new episode.\n obs, info = env.reset()\n assert obs[\"utterance\"] == \"Click button ONE.\"\n assert obs[\"fields\"] == ((\"target\", \"ONE\"),)\n time.sleep(2) # Only here to let you look at the environment.\n \n # Find the HTML element with text \"ONE\".\n for element in obs[\"dom_elements\"]:\n if element[\"text\"] == \"ONE\":\n break\n\n # Click on the element.\n action = env.unwrapped.create_action(ActionTypes.CLICK_ELEMENT, ref=element[\"ref\"])\n obs, reward, terminated, truncated, info = env.step(action)\n\n # Check if the action was correct. \n print(reward) # Should be around 0.8 since 2 seconds has passed.\n assert terminated is True\n time.sleep(2)\n\nfinally:\n env.close()\n```\n\nSee [the documentation](http://miniwob.farama.org/content/basic_usage/) for more information.\n\n# Environments\n\nThe list of the environments that were included in the MiniWoB++ library can be found in the\n[documentation](http://miniwob.farama.org/environments/list/).\nAll environments share the same [observation space](http://miniwob.farama.org/content/observation_space/),\nwhile the [action space](http://miniwob.farama.org/content/action_space/) can be configured during environment construction.\n\n# Citation\n\nTo cite this project please use:\n\n```bibtex\n@inproceedings{liu2018reinforcement,\n author = {Evan Zheran Liu and Kelvin Guu and Panupong Pasupat and Tianlin Shi and Percy Liang},\n title = {Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration},\n booktitle = {International Conference on Learning Representations ({ICLR})},\n url = {https://arxiv.org/abs/1802.08802},\n year = {2018},\n}\n```\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A web interaction benchmark for reinforcement learning.",
"version": "1.0",
"project_urls": {
"Bug Report": "https://github.com/Farama-Foundation/miniwob-plusplus/issues",
"Documentation": "https://miniwob.farama.org",
"Homepage": "https://farama.org",
"Repository": "https://github.com/Farama-Foundation/miniwob-plusplus"
},
"split_keywords": [
"reinforcement learning",
"game",
"rl",
"ai",
"gymnasium"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7b87221ef054080a4f51c3fc19b0fa7388c429229e1a3ff50eb1dc7ce5e29991",
"md5": "3f5f113047baf3fb67cd4f4b51fe1443",
"sha256": "4b98466d863b2bc25d44acbcb719434c797b350b5e417b673766c1b6237f4704"
},
"downloads": -1,
"filename": "miniwob-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3f5f113047baf3fb67cd4f4b51fe1443",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 1877242,
"upload_time": "2023-08-14T17:15:36",
"upload_time_iso_8601": "2023-08-14T17:15:36.661484Z",
"url": "https://files.pythonhosted.org/packages/7b/87/221ef054080a4f51c3fc19b0fa7388c429229e1a3ff50eb1dc7ce5e29991/miniwob-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "693f0d6b99f2c240823549e1fbe266d1dc9df87017271e3f5733f65839f0ec5e",
"md5": "0c39c05e0966af20e1f026f665452e5a",
"sha256": "4ea53c90d94b76ec0bd4cf6fa61ae2d70bd06c5cae7e9f0a0deaa0d5680e714b"
},
"downloads": -1,
"filename": "miniwob-1.0.tar.gz",
"has_sig": false,
"md5_digest": "0c39c05e0966af20e1f026f665452e5a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 1640997,
"upload_time": "2023-08-14T17:15:38",
"upload_time_iso_8601": "2023-08-14T17:15:38.847958Z",
"url": "https://files.pythonhosted.org/packages/69/3f/0d6b99f2c240823549e1fbe266d1dc9df87017271e3f5733f65839f0ec5e/miniwob-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-14 17:15:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Farama-Foundation",
"github_project": "miniwob-plusplus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "miniwob"
}