Wumpus World Game
Wumpus World Ai
The Wumpus World in Artificial intelligence Wumpus world:The Wumpus world is a simple world example to illustrate the worth of a knowledge-based agent and to represent knowledge representation. It was inspired by a video game Hunt the Wumpus by Gregory Yob in 1973.The Wumpus world is a cave which has 4/4 rooms connected with passageways. So there are total 16 rooms which are connected with each other. We have a knowledge-based agent who will go forward in this world. The cave has a room with a beast which is called Wumpus, who eats anyone who enters the room.
The Wumpus can be shot by the agent, but the agent has a single arrow. In the Wumpus world, there are some Pits rooms which are bottomless, and if agent falls in Pits, then he will be stuck there forever.
Hunt The Wumpus Java
The exciting thing with this cave is that in one room there is a possibility of finding a heap of gold. So the agent goal is to find the gold and climb out the cave without fallen into Pits or eaten by Wumpus.
The agent will get a reward if he comes out with gold, and he will get a penalty if eaten by Wumpus or falls in the pit. Note: Here Wumpus is static and cannot move.Following is a sample diagram for representing the Wumpus world. It is showing some rooms with Pits, one room with Wumpus and one agent at (1, 1) square location of the world.There are also some components which can help the agent to navigate the cave.
![World World](https://raw.githubusercontent.com/mjchao/Logic-Based-Maze-Navigation/master/maze_explanation_2.png)
// Renders the player board perspectiveplayer.render;// Returns current player informationplayer.debug;// Returns the last action taken null if noneplayer.getLastAction;// Step-by-step debug Environment.trace; Output +-+-+-+-+ +-+-+-+-+ +-+-+-+-+ +-+-+-+-+ → +-+-+-+-+// player.debugPosition: (1,3,E)Score: -1Perceptions: BREEZEGOFORWARDPress ENTER to continue.Deterministic boardBy default, all the dangers and the gold are setup in random fashion at each run. You can setup the board as you like by calling the setters methods. // Creates a deterministic world World world = new World( 4, 4);world.setWumpus( 0, 1);world.setPit( 2, 2);world.setPit( 3, 0);world.setGold( 1, 1);// Show the board System.out.println(world.renderAll); Output +-+-+-+-+ P ≈ +-+-+-+-+ W $. ≈ ≈ +-+-+-+-+ P ≈ ≈ +-+-+-+-+ → ≈ +-+-+-+-+DisclaimerThis game structure and implementation is based on the Wumpus Lite v0.21a of James P. Biagioni of the University of Illinois at Chicago.Available at. LicenseCopyright (c) 2016 Edson Hilios.
This is a free software is licensed under the MIT License. Mail me: edson (at) hilios (dot) com (dot) br.