{"id":20252016,"url":"https://github.com/swamikannan/cliffwalk","last_synced_at":"2026-05-01T06:31:24.151Z","repository":{"id":167542908,"uuid":"532752485","full_name":"SwamiKannan/CliffWalk","owner":"SwamiKannan","description":"Cliffwalk to compare SARSA and Q-Learning","archived":false,"fork":false,"pushed_at":"2022-10-25T14:40:40.000Z","size":1781,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T11:04:31.893Z","etag":null,"topics":["cliffwalking","python3","q-learning","q-learning-algorithm","q-learning-vs-sarsa","sarsa-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwamiKannan.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-05T05:13:12.000Z","updated_at":"2022-09-18T08:44:40.000Z","dependencies_parsed_at":"2023-05-23T01:15:37.527Z","dependency_job_id":null,"html_url":"https://github.com/SwamiKannan/CliffWalk","commit_stats":null,"previous_names":["swamikannan/cliffwalk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SwamiKannan/CliffWalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwamiKannan%2FCliffWalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwamiKannan%2FCliffWalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwamiKannan%2FCliffWalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwamiKannan%2FCliffWalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwamiKannan","download_url":"https://codeload.github.com/SwamiKannan/CliffWalk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwamiKannan%2FCliffWalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cliffwalking","python3","q-learning","q-learning-algorithm","q-learning-vs-sarsa","sarsa-learning"],"created_at":"2024-11-14T10:14:24.247Z","updated_at":"2026-05-01T06:31:24.146Z","avatar_url":"https://github.com/SwamiKannan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a series of projects where I solve RL environments by building RL algorithms from scratch using Python, Pytorch and Tensorflow\n\n# Exercise\nCompare the SARSA and the Q-learning algorithms using the GridWorld Cliff walking environment\n# CliffWalk\n![Cliff Walking representation](cliff_walking.png \"Cliff Walking\")\n## Environment:\nThis is a simple implementation of the Gridworld Cliff reinforcement learning task.\u003cbr\u003e  Adapted from Example 6.6 (page 106) from Reinforcement Learning: An Introduction by Sutton and Barto: http://incompleteideas.net/book/bookdraft2018jan1.pdf\n\u003cbr\u003eWith inspiration from: https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/cliff_walking.py\u003cbr\u003e\nThe board is a 4x12 matrix, with (using NumPy matrix indexing):\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;o\t[3, 0] as the start at bottom-left\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;o\t[3, 11] as the goal at bottom-right\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;o\t[3, 1..10] as the cliff at bottom-center\u003cbr\u003e\nEach time step incurs -1 reward, and stepping into the cliff incurs -100 reward and a reset to the start. An episode terminates when the agent reaches the goal.\u003cbr\u003e\n\nFrom Sutton and Barto's Reinforcement Learning: An Introduction textbook\n\nExample 6.6: Cliff Walking This gridworld example compares Sarsa and Q-learning, highlighting the difference between on-policy (Sarsa) and off-policy (Q-learning) methods. Consider the gridworld shown below. This is a standard undiscounted, episodic task, with start and goal states, and the usual actions causing movement up, down,right, and left. Reward is -1 on all transitions except those into the region marked “The Cliff”. Stepping into this region incurs a reward of -100 and sends the agent instantly back to the start.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswamikannan%2Fcliffwalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswamikannan%2Fcliffwalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswamikannan%2Fcliffwalk/lists"}