{"id":23062109,"url":"https://github.com/mahmood-anaam/grid-world-value-iteration","last_synced_at":"2026-05-10T06:51:28.058Z","repository":{"id":252309564,"uuid":"840051001","full_name":"Mahmood-Anaam/grid-world-value-iteration","owner":"Mahmood-Anaam","description":"An implementation of the Value Iteration algorithm for solving the Grid World problem. This project provides a function to compute the optimal value function for a grid-based environment where a robot navigates to maximize rewards while avoiding penalties.","archived":false,"fork":false,"pushed_at":"2024-08-08T22:04:11.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T21:11:39.309Z","etag":null,"topics":["dynamic-programming","grid-world","numpy","optimization-problem","python","value-iteration-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mahmood-Anaam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-08T21:46:17.000Z","updated_at":"2024-08-08T22:07:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c50e1d0-a20f-4a71-ba90-5a8ce3223c04","html_url":"https://github.com/Mahmood-Anaam/grid-world-value-iteration","commit_stats":null,"previous_names":["mahmood-anaam/grid-world-value-iteration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahmood-Anaam%2Fgrid-world-value-iteration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahmood-Anaam%2Fgrid-world-value-iteration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahmood-Anaam%2Fgrid-world-value-iteration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahmood-Anaam%2Fgrid-world-value-iteration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mahmood-Anaam","download_url":"https://codeload.github.com/Mahmood-Anaam/grid-world-value-iteration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952621,"owners_count":20859870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamic-programming","grid-world","numpy","optimization-problem","python","value-iteration-algorithm"],"created_at":"2024-12-16T03:19:54.677Z","updated_at":"2026-05-10T06:51:23.004Z","avatar_url":"https://github.com/Mahmood-Anaam.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grid World Value Iteration\n\n## Overview\n\nThis repository contains an implementation of the Value Iteration algorithm for solving the Grid World problem. The Grid World problem involves navigating a robot through a grid to reach a goal state while minimizing penalties associated with moving and avoiding undesirable states.\n\n## Problem Description\n\nConsider a robot navigating in a grid-based environment. Each cell in the grid represents a distinct state of the surroundings. The robot can take four deterministic actions at each cell: \"up,\" \"down,\" \"left,\" and \"right,\" resulting in the robot to move precisely one cell in the corresponding direction on the grid. Actions that would take the agent off the grid are not allowed. Within the grid, certain states (orange) correspond to undesirable conditions, such as rough terrain, while one state (green) represents the ultimate goal.\n\nUpon reaching the goal state, the robot gains a reward of 1. Conversely, traversing the rough terrain incurs a penalty (or negative reward) of 10. Additionally, every move the robot makes entails a penalty of 1. The robot's primary objective is to efficiently reach the goal state, aiming to maximize the total reward (minimize the total penalty) incurred. This entails both avoiding the rough terrain and efficiently navigating through the grid.\n\n\u003cimg src=\"grid_world.png\" alt=\"Image\" width=\"300\" height=\"300\" /\u003e\n\nIn the Grid World environment:\n- Each cell represents a state with associated rewards or penalties.\n- The robot can move \"up\", \"down\", \"left\", or \"right\".\n- Moving off the grid is not allowed.\n- The goal is to reach the final state with maximum reward while minimizing penalties.\n\n### Rewards and Penalties\n- **Goal State**: Reward of +1.\n- **Rough Terrain**: Penalty of -10.\n- **Each Move**: Penalty of -1.\n\n## Implementation\n\n### Value Iteration Algorithm\n\nThe Value Iteration algorithm iteratively updates the value function for each state based on the expected rewards of possible actions. The process continues until the value function converges.\n\n\n### Requirements\n\n- **Python 3.x**\n- **NumPy**\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Mahmood-Anaam/grid-world-value-iteration.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd grid-world-value-iteration\n   ```\n\n3. Install the required packages:\n   ```bash\n   pip install numpy\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmood-anaam%2Fgrid-world-value-iteration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmood-anaam%2Fgrid-world-value-iteration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmood-anaam%2Fgrid-world-value-iteration/lists"}