Today we made a few more additions that were necessary before implementing shooting the Wumpus.
Due to the fact that there is always one Wumpus and one pile of gold in each level, we realized that we could figure out their exact positions in the grid before we even got there. Based on the senses our robot received from the program, it was able to create probabilities for each tile connected to a specific sense.
What the photo represents:
A red "X" means that the robot senses a "STENCH" at that space.
A purple "X" means that the robot senses "GLITTER" at that space.
A green number represents the "probability" of that tile being the Wumpus.
A yellow number represents the "probability" of that tile being the gold.
For each of the tiles surrounding those senses, the probabilities of being either gold or the Wumpus are updated. As shown below, the tile at (1, 1) is adjacent to 3 tiles that have a stench, so the "probability" of that tile being the Wumpus is 3. This also applies to finding gold, but with "GLITTER" instead of "STENCH".
This isn't actually using probability - it is using logic - so we can actually guarantee the position of the Wumpus and the gold each time we run our program. We can do this by identifying the tile with either the highest probability of the tile being the Wumpus or the tile with the highest probability of the tile being the gold.
Now we are able to implement shooting!
Comments