Name | gridmind JSON |
Version |
0.0.5
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-12-15 09:14:41 |
maintainer | None |
docs_url | None |
author | Falguni Das Shuvo |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2024 Falguni Das Shuvo 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. |
keywords |
reinforcement learning
temporal difference
td control
td prediction
sarsa
q-learning
monte carlo
monte carlo control
monte carlo prediction
n-step methods
n-step sarsa
n-step td
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GridMind ๐ง
[](https://github.com/shuvoxcd01/GridMind/actions/workflows/python-publish.yml)
**GridMind** is a library of reinforcement learning (RL) algorithms. This library prioritizes **tabular implementations** to enhance understanding and facilitate hands-on experimentation with learning patterns in various RL algorithms. GridMind is compatible with **`gymnasium` environments**, making it easy to integrate with a wide range of standard RL environments.
This library is also designed to serve as a companion for readers of the book *Reinforcement Learning: An Introduction (2nd ed.)* by Richard S. Sutton and Andrew G. Barto.
> **Note**: GridMind is a work in progress and will be updated with additional algorithms and features over time.
---
<div align="left">
<table style="margin: auto;">
<tr>
<td style="vertical-align: top; padding-right: 10px;">
## ๐ Algorithms Included
### 1. Monte Carlo Methods
- **Every-Visit MC**: *Prediction*
- **Exploring Starts**: *Prediction & Control*
- **Off-Policy MC**: *Prediction & Control*
### 2. Temporal Difference (TD) Methods
- **TD(0)**: *Prediction*
- **SARSA**: *Control*
- **Q-Learning**: *Control*
### 3. N-Step Methods
- **N_Step TD Prediction**: *Prediction*
- **N_Step SARSA**: *Control*
### 4. Function Approximation
- **Semi-gradient TD-0 Prediction**: *Prediction*
- **Gradient Monte-Carlo Prediction**: *Prediction*
</td>
<td style="vertical-align: top;">
<img src="example_usage/demo.gif" alt="Demo" width="300">
*Figure: GridMind on different environments.*
</td>
</tr>
</table>
</div>
---
## Getting Started ๐
To use GridMind, youโll need:
- Python (>= 3.8)
1. **Installation**: Clone the repository and install the package with the following commands:
```bash
git clone https://github.com/shuvoxcd01/GridMind.git
cd GridMind
pip install .
```
Or, install it from **PyPI**:
```bash
pip install gridmind
```
2. **Basic Usage**:
```python
from gridmind.algorithms.temporal_difference.control.q_learning import QLearning
import gymnasium as gym
# Initialize the Taxi-v3 environment
env = gym.make("Taxi-v3")
agent = QLearning(env=env)
# Train the agent
agent.optimize_policy(num_episodes=10000)
# Get the learned policy
policy = agent.get_policy()
# Close and re-open the environment for rendering
env.close()
env = gym.make("Taxi-v3", render_mode="human")
# Demonstrate the policy
obs, _ = env.reset()
for step in range(100):
action = policy.get_action_deterministic(state=obs)
next_obs, reward, terminated, truncated, _ = env.step(action=action)
print("Reward: ", reward)
obs = next_obs
env.render()
if terminated or truncated:
obs, _ = env.reset()
env.close()
```
## ๐ Contribution
Contributions are welcome! Whether itโs bug fixes, new features, or suggestions, feel free to open an issue or submit a pull request. We appreciate the community's input in making GridMind a valuable learning resource for all.
Raw data
{
"_id": null,
"home_page": null,
"name": "gridmind",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Reinforcement Learning, Temporal Difference, TD Control, TD Prediction, SARSA, Q-Learning, Monte Carlo, Monte Carlo Control, Monte Carlo Prediction, N-Step Methods, N-Step SARSA, N-Step TD",
"author": "Falguni Das Shuvo",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/30/fe/da2ff5a8fae67a32d200f1988f58b1d70c0cff5d1a62398b18383c68a7ee/gridmind-0.0.5.tar.gz",
"platform": null,
"description": "# GridMind \ud83e\udde0\n\n[](https://github.com/shuvoxcd01/GridMind/actions/workflows/python-publish.yml)\n\n**GridMind** is a library of reinforcement learning (RL) algorithms. This library prioritizes **tabular implementations** to enhance understanding and facilitate hands-on experimentation with learning patterns in various RL algorithms. GridMind is compatible with **`gymnasium` environments**, making it easy to integrate with a wide range of standard RL environments.\n\nThis library is also designed to serve as a companion for readers of the book *Reinforcement Learning: An Introduction (2nd ed.)* by Richard S. Sutton and Andrew G. Barto.\n\n> **Note**: GridMind is a work in progress and will be updated with additional algorithms and features over time.\n\n---\n<div align=\"left\">\n<table style=\"margin: auto;\">\n<tr>\n<td style=\"vertical-align: top; padding-right: 10px;\">\n\n## \ud83d\udcdc Algorithms Included\n\n### 1. Monte Carlo Methods\n - **Every-Visit MC**: *Prediction*\n - **Exploring Starts**: *Prediction & Control*\n - **Off-Policy MC**: *Prediction & Control*\n\n### 2. Temporal Difference (TD) Methods\n - **TD(0)**: *Prediction*\n - **SARSA**: *Control*\n - **Q-Learning**: *Control*\n\n### 3. N-Step Methods\n - **N_Step TD Prediction**: *Prediction*\n - **N_Step SARSA**: *Control*\n\n### 4. Function Approximation\n - **Semi-gradient TD-0 Prediction**: *Prediction*\n - **Gradient Monte-Carlo Prediction**: *Prediction*\n \n\n</td>\n<td style=\"vertical-align: top;\">\n<img src=\"example_usage/demo.gif\" alt=\"Demo\" width=\"300\">\n \n*Figure: GridMind on different environments.* \n</td>\n</tr>\n</table>\n</div>\n\n---\n\n## Getting Started \ud83d\ude80\n\nTo use GridMind, you\u2019ll need:\n- Python (>= 3.8)\n\n1. **Installation**: Clone the repository and install the package with the following commands:\n ```bash\n git clone https://github.com/shuvoxcd01/GridMind.git\n cd GridMind\n pip install .\n ```\n Or, install it from **PyPI**:\n ```bash\n pip install gridmind\n ```\n\n2. **Basic Usage**: \n ```python\n from gridmind.algorithms.temporal_difference.control.q_learning import QLearning\n import gymnasium as gym\n\n # Initialize the Taxi-v3 environment\n env = gym.make(\"Taxi-v3\")\n agent = QLearning(env=env)\n\n # Train the agent\n agent.optimize_policy(num_episodes=10000)\n\n # Get the learned policy\n policy = agent.get_policy()\n\n # Close and re-open the environment for rendering\n env.close()\n env = gym.make(\"Taxi-v3\", render_mode=\"human\")\n\n # Demonstrate the policy\n obs, _ = env.reset()\n for step in range(100):\n action = policy.get_action_deterministic(state=obs)\n next_obs, reward, terminated, truncated, _ = env.step(action=action)\n print(\"Reward: \", reward)\n obs = next_obs\n env.render()\n\n if terminated or truncated:\n obs, _ = env.reset()\n\n env.close()\n ```\n\n\n## \ud83c\udf0d Contribution\n\nContributions are welcome! Whether it\u2019s bug fixes, new features, or suggestions, feel free to open an issue or submit a pull request. We appreciate the community's input in making GridMind a valuable learning resource for all.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Falguni Das Shuvo 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. ",
"summary": null,
"version": "0.0.5",
"project_urls": {
"Repository": "https://github.com/shuvoxcd01/GridMind.git"
},
"split_keywords": [
"reinforcement learning",
" temporal difference",
" td control",
" td prediction",
" sarsa",
" q-learning",
" monte carlo",
" monte carlo control",
" monte carlo prediction",
" n-step methods",
" n-step sarsa",
" n-step td"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2984776f92c6be8491ed997b487eb8d09569501bcd68c2868fb7463a21c3c7ad",
"md5": "6a96f85e8803021ac27a28565ed90080",
"sha256": "fc9b5f993b129dc896f05bc7609b02adf6e9c0eb02357ac2c9d003835a7c69a1"
},
"downloads": -1,
"filename": "gridmind-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6a96f85e8803021ac27a28565ed90080",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 33332,
"upload_time": "2024-12-15T09:14:39",
"upload_time_iso_8601": "2024-12-15T09:14:39.617755Z",
"url": "https://files.pythonhosted.org/packages/29/84/776f92c6be8491ed997b487eb8d09569501bcd68c2868fb7463a21c3c7ad/gridmind-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "30feda2ff5a8fae67a32d200f1988f58b1d70c0cff5d1a62398b18383c68a7ee",
"md5": "b49e97de1bdab9d5f98720dc97c85498",
"sha256": "7e0ccfbb80666174e7e7712b40c2d48a934efb7ca4944c126a002e4704b6d424"
},
"downloads": -1,
"filename": "gridmind-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "b49e97de1bdab9d5f98720dc97c85498",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17546,
"upload_time": "2024-12-15T09:14:41",
"upload_time_iso_8601": "2024-12-15T09:14:41.719864Z",
"url": "https://files.pythonhosted.org/packages/30/fe/da2ff5a8fae67a32d200f1988f58b1d70c0cff5d1a62398b18383c68a7ee/gridmind-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-15 09:14:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shuvoxcd01",
"github_project": "GridMind",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gridmind"
}