{"id":20862830,"url":"https://github.com/quickheaven/wumpusworld","last_synced_at":"2025-09-11T18:40:52.749Z","repository":{"id":218807255,"uuid":"747410273","full_name":"quickheaven/WumpusWorld","owner":"quickheaven","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-02T23:01:12.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T07:45:12.213Z","etag":null,"topics":["artificial-intelligence","intelligent-agent","networkx","object-oriented-programming","pomegranate","probabilistic-programming","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/quickheaven.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":"2024-01-23T21:45:12.000Z","updated_at":"2024-05-04T21:24:57.000Z","dependencies_parsed_at":"2024-04-02T23:48:21.448Z","dependency_job_id":null,"html_url":"https://github.com/quickheaven/WumpusWorld","commit_stats":null,"previous_names":["quickheaven/wumpusworld"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2FWumpusWorld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2FWumpusWorld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2FWumpusWorld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2FWumpusWorld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quickheaven","download_url":"https://codeload.github.com/quickheaven/WumpusWorld/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243236301,"owners_count":20258822,"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":["artificial-intelligence","intelligent-agent","networkx","object-oriented-programming","pomegranate","probabilistic-programming","python"],"created_at":"2024-11-18T05:26:03.250Z","updated_at":"2025-03-12T14:42:02.266Z","avatar_url":"https://github.com/quickheaven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WumpusWorld\n\n@author Arjie Cristobal\n\u003cpre\u003e\nThe app was developed using OOP with Python. The basic design is based on the following: \u003cbr/\u003e\nA. The Wumpus World HAS-A Environment.\n  Environment HAS-A Matrix (Cave).\n  Each element of Matrix IS-A Cell (Room).\n  The Cell HAS-A Item(s) that can be Gold, Pit and Wumpus (extends the Item).\n  The Cell HAS-A State(s) that can be Stench, Breeze, Glitter, Scream.\n\nB. The Wumpus World also HAS-A Agent (Player) that will explore the Environment.\n  The Agent have a behavior to perform the 'next action' which can be Forward, Turn Left, Turn Right, Shoot, Grab and Climb.\n  The Agent HAS-A 'Orientation' and 'Perception'.\n  \n\u003c/pre\u003e\nBelow is sample start and game ends.\n\n*The Environment parameter index_display_start_on_zero is set to False.*\n\nThe WumpusWorld Game starts:\n\n```\n********* Game Starts *********\nNAIVE_AGENT Gold: False, Arrow: True, Alive: True, Coords: (0,0), Orientation: East\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: False, Reward: 0.0\n+---------------------+--------------------+-------------------+---------------+\n| Cell [3][0]:        | Cell [3][1]:       | Cell [3][2]:      | Cell [3][3]:  |\n| STENCH              | WUMPUS (A)         | STENCH BREEZE     |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [2][0]:        | Cell [2][1]:       | Cell [2][2]: PIT  | Cell [2][3]:  |\n|                     | STENCH BREEZE      |                   | BREEZE        |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [1][0]:        | Cell [1][1]:       | Cell [1][2]: GOLD | Cell [1][3]:  |\n|                     |                    | GLITTER BREEZE    |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [0][0]:        | Cell [0][1]:       | Cell [0][2]:      | Cell [0][3]:  |\n| NAIVE_AGENT (A)     |                    |                   |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n```\n\nAfter the the agent made several moves, the game ends after the agent steps to a Pit.\n\n```\nThe Agent dies a miserable death because it enters a cell containing a Pit.\nNAIVE_AGENT Gold: False, Arrow: False, Alive: False, Coords: (2,2), Orientation: East\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: True, Reward: -1001\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]: WUMPUS   | Cell [3][2]:         | Cell [3][3]:  |\n| STENCH        | (A)                   | STENCH BREEZE        |               |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]: PIT     | Cell [2][3]:  |\n|               | STENCH BREEZE         | NAIVE_AGENT (D)      | BREEZE        |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]:          | Cell [1][2]: GOLD    | Cell [1][3]:  |\n|               |                       | GLITTER BREEZE       |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n\n\nGame Over.\n```\n\n## Move Planning Agent\nThis agent is capable of returning back safely after grabbing the gold.\n\n```\nMovePlanningAgent.next_action: \nagent_state: location: (1,2), orientation: North, has_gold: False, has_arrow: False, is_alive: True, \nsafe_locations: {(0, 1), (0, 2), (1, 2), (0, 0)}, \nEnvironment apply_action: FORWARD\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (1,2), Orientation: North\nPERCEPTION Stench: True, Breeze: False, Glitter: True, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (↑)              |               |\n|               |                       | GLITTER STENCH       |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nEnvironment apply_action: GRAB\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (1,2), Orientation: North\nPERCEPTION Stench: True, Breeze: False, Glitter: True, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (↑)              |               |\n|               |                       | GLITTER STENCH       |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nBuilding the escape plan using networkx.\nSource Node: (1, 2), Target Node: (0, 0)\nThe shortest path: [(1, 2), (0, 2), (0, 1), (0, 0)]\n__direction fr_location: (1,2), to_location: (0,2)\n__rotate: node_orientation: South, agent_orientation: North\n__direction fr_location: (1,2), to_location: (0,2)\n__rotate: node_orientation: South, agent_orientation: East\n__direction fr_location: (1,2), to_location: (0,2)\n__direction fr_location: (0,2), to_location: (0,1)\n__rotate: node_orientation: West, agent_orientation: South\n__direction fr_location: (0,2), to_location: (0,1)\n__direction fr_location: (0,1), to_location: (0,0)\nThe action list of the escape plan [2, 2, 0, 2, 0, 0].\nEnvironment apply_action: TURN_RIGHT\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (1,2), Orientation: East\nPERCEPTION Stench: True, Breeze: False, Glitter: True, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (→)              |               |\n|               |                       | GLITTER STENCH       |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nExecute the escape plan based on action_list [2, 0, 2, 0, 0].\nEnvironment apply_action: TURN_RIGHT\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (1,2), Orientation: South\nPERCEPTION Stench: True, Breeze: False, Glitter: True, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (↓)              |               |\n|               |                       | GLITTER STENCH       |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nExecute the escape plan based on action_list [0, 2, 0, 0].\nEnvironment apply_action: FORWARD\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (0,2), Orientation: South\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | GLITTER STENCH       |               |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (↓)              |               |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nExecute the escape plan based on action_list [2, 0, 0].\nEnvironment apply_action: TURN_RIGHT\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (0,2), Orientation: West\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+-----------------------+----------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:          | Cell [3][2]:         | Cell [3][3]:  |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:          | Cell [2][2]:         | Cell [2][3]:  |\n|               | STENCH                |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS   | Cell [1][2]: GOLD    | Cell [1][3]:  |\n| STENCH        | (A)                   | GLITTER STENCH       |               |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:          | Cell [0][2]:         | Cell [0][3]:  |\n|               | STENCH                | MOVE_PLANNING_AGENT  |               |\n|               |                       | (A) (←)              |               |\n|               |                       |                      |               |\n+---------------+-----------------------+----------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nExecute the escape plan based on action_list [0, 0].\nEnvironment apply_action: FORWARD\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (0,1), Orientation: West\nPERCEPTION Stench: True, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------+--------------------------+-------------------+---------------+\n| Cell [3][0]:  | Cell [3][1]:             | Cell [3][2]:      | Cell [3][3]:  |\n|               |                          |                   |               |\n+---------------+--------------------------+-------------------+---------------+\n| Cell [2][0]:  | Cell [2][1]:             | Cell [2][2]:      | Cell [2][3]:  |\n|               | STENCH                   |                   |               |\n+---------------+--------------------------+-------------------+---------------+\n| Cell [1][0]:  | Cell [1][1]: WUMPUS (A)  | Cell [1][2]: GOLD | Cell [1][3]:  |\n| STENCH        |                          | GLITTER STENCH    |               |\n+---------------+--------------------------+-------------------+---------------+\n| Cell [0][0]:  | Cell [0][1]:             | Cell [0][2]:      | Cell [0][3]:  |\n|               | MOVE_PLANNING_AGENT (A)  |                   |               |\n|               | (←)                      |                   |               |\n|               | STENCH                   |                   |               |\n+---------------+--------------------------+-------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\nExecute the escape plan based on action_list [0].\nEnvironment apply_action: FORWARD\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (0,0), Orientation: West\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: False, Reward: -1\n+---------------------+--------------------+-------------------+---------------+\n| Cell [3][0]:        | Cell [3][1]:       | Cell [3][2]:      | Cell [3][3]:  |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [2][0]:        | Cell [2][1]:       | Cell [2][2]:      | Cell [2][3]:  |\n|                     | STENCH             |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [1][0]:        | Cell [1][1]:       | Cell [1][2]: GOLD | Cell [1][3]:  |\n| STENCH              | WUMPUS (A)         | GLITTER STENCH    |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [0][0]:        | Cell [0][1]:       | Cell [0][2]:      | Cell [0][3]:  |\n| MOVE_PLANNING_AGENT | STENCH             |                   |               |\n| (A) (←)             |                    |                   |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n```\n\n```\nThe agent have the gold. Performing the escape plan.\n**** The agent wins the game. ****\nEnvironment apply_action: CLIMB\nMOVE_PLANNING_AGENT Gold: True, Arrow: False, Alive: True, Coords: (0,0), Orientation: West\nPERCEPTION Stench: False, Breeze: False, Glitter: False, Bump: False, Scream: False, Is_Terminated: True, Reward: 999\n+---------------------+--------------------+-------------------+---------------+\n| Cell [3][0]:        | Cell [3][1]:       | Cell [3][2]:      | Cell [3][3]:  |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [2][0]:        | Cell [2][1]:       | Cell [2][2]:      | Cell [2][3]:  |\n|                     | STENCH             |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [1][0]:        | Cell [1][1]:       | Cell [1][2]: GOLD | Cell [1][3]:  |\n| STENCH              | WUMPUS (A)         | GLITTER STENCH    |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n| Cell [0][0]:        | Cell [0][1]:       | Cell [0][2]:      | Cell [0][3]:  |\n| MOVE_PLANNING_AGENT | STENCH             |                   |               |\n| (A) (←)             |                    |                   |               |\n|                     |                    |                   |               |\n+---------------------+--------------------+-------------------+---------------+\n\nGame Over.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickheaven%2Fwumpusworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquickheaven%2Fwumpusworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickheaven%2Fwumpusworld/lists"}