Wumpus World game (prolog)

Order Instructions/Description

Introduction:
In this workshop we asked to explain how the frames and rules in Flex program and their associated facilities could be used to design the “Wumpus World game “. In addition, this report also will explain particularly that how the frame system could be used to represent the game, the adventure of the game and the dangerous in the game. At the end of the report it will be discuss that if the frame and rule is good or bad idea to use it in this type of game.
((Write more if you can))
The assignment is divided in two parts that part (A) is explaining how frames/ rules and their associated facilities could be used effectively in the ‘Wumpus World’ game seen previously. Explain particularly how a frame system could be used to:
1. represent the world of the game
2. represent the adventurer
3. represent the dangers in the world
4. execute the simulator (using rules), i.e. to guide the adventurer agent through the world and its dangers to the gold
Note: Use Flex/ Prolog code to demonstrate your ideas
Part B is explaining why it might be a good/ bad idea to use the frame/ rule approach in situations such as this
((The above is the assignment))
Part A:
Figure A1: General view of Wumpus World game

The essences of the questions are to classify the game into different parts, for example represent each cell in the game has different attribute. Moreover, we use the frame to build the game and show it on the screen as interactive game. Furthermore, in this game the agent should found the gold and try hardly to eliminate the risks, which are the Wumpus and the pit, depending on some hints like the room smell. The agent should found the gold rely on type of search which is depth search as shown in figure A1 as a general view for the game.
Figure A2: Detailed view of Wumpus world game movement

As shown above on figure A2 is the detailed view of the agent movement and which cell he equipped and what the agent found in each cell that he visited.
Representing  the world of the game:
By using Figure A2 as guide to build the representation of the wumpus world game. The table underneath is showing a detailed view for the codes that I done and comments on each piece of code.

Steps    Command in Prolog FLEX    Comment
1    frame wumpus_world ;
default search_for is gold and
default Adventurer is 1 and
default Gold is 1 and
default Cells are 16 and
default Pits are 3 and
default Wumpus is 1.
The first part of the code is to identify the top level of the game, which is the Wumpus word, and it has the description of the game content. As shown on the command column for step 1 , we only got one adventurer , wumpus and gold , 3 pits are in the cells , each one of them separated inside the 16 cells
The remains are the rooms and each room has different attributes depending on the game how is the game work, all cells inherit the basic attributes from the top level of the game, which is Wumpus_world.

Steps    Command in Prolog FLEX
2    frame cell1 is a wumpus_world;
default location is 1 and
default visited is yes.

3    frame cell2 is a cell1;
default location is 2 and
default breeze is yes and
default visited is yes.

4    frame cell5 is a cell1, cell6;
default location is 5 and
default stench is yes and
default visited is yes.

5    frame cell6 is a cell2, cell5;
default location is 6 and
default visited is yes.

6    frame cell3 is a cell2, cell7;
default location is 3 and
default pit is yes.

7    frame cell9 is a cell5;
default location is 9 and
default wumpus is yes.

8    frame cell7 is a cell6;
default location is 7 and
default breeze is yes and
default visited is yes.

9    frame cell10 is a cell6;
default location is 10 and
default breeze is yes and
default stench is yes and
default gold is yes.

10    frame cell8 is a cell7
default location is 8.

11    frame cell11 is a cell7
default location is 11 and
default pit is yes.

To show the graphical overview of the by using the graphical frame for the Wumpus world game in flax as shown in Figure A3 underneath.

Figure A3: Graph frame for the Wumpus world game
Represent the adventurer
The game contains 16 cells, the agent must have the path to gold without enter the wrong cell, which may have the pit or the wumpus. The agent have a hints before enter the cell if the cell that he plan to visit is smell breeze it manes that the cell has a pit, if it smell stench that manes the wumpus in the cell same as shown in figure A2. The agent must compare between the local attribute and the cell goal attribute, which is have the gold to win the game.
The table underneath is showing the graphical representation of each cell with the frame information.

Cell    Frame information    Cell    Frame information    Cell    Frame information    Cell    Frame information    Cell    Frame information    Cell    Frame information
Wumpus world         2         5         7         9         11
1         3         6         8         10