Questions tagged [wumpus-world]

The wumpus world is a simple test environment for intelligent agents.

The wumpus world is a simple test environment for intelligent agents. It is inspired by the computer game Hunt the Wumpus.

15 questions
5
votes
1 answer

Are comonads a good fit for modeling the Wumpus world?

I'm trying to find some practical applications of a comonad and I thought I'd try to see if I could represent the classical Wumpus world as a comonad. I'd like to use this code to allow the Wumpus to move left and right through the world and clean…
Tim Stewart
  • 5,350
  • 2
  • 30
  • 45
4
votes
3 answers

How to read data from file into Prolog

I am using SWI-Prolog to create a Wumpus World project. I am supposed to read the locations of the gold, pits, and the Wumpus from a .txt file that looks like this: GOLD 3 2 WUMPUS 3 3 PIT 2 1 PIT 3 4 Where the words identify the…
caleb
  • 43
  • 4
2
votes
0 answers

How to get person to move by checking adjacent squares instead of manually inputting them in prolog?

I am trying to write a Prolog application were an archer will move into an adjacent square that is safe on a grid that is in a 4 x 4 system, this should be done by archer itself, for example if the square above the archer is safe he will move into…
Ciaran Donoghue
  • 800
  • 3
  • 22
  • 46
2
votes
0 answers

How to move to safe adjacent square in prolog?

I am trying to write a Prolog application were an archer will move into an adjacent square that is safe on a 4 x 4 grid. For example the archer is in the square column 1 row 4, he can move up or right if it does not contain the monster recorded as…
Craig Gallagher
  • 1,613
  • 6
  • 23
  • 52
1
vote
2 answers

Prolog path backtracking runs forever depending on grid size

I've written some code to do backtracking in Prolog that generates all the possible paths to reach the Gold cell from the initial one (Agent). The input of getAllPaths is the map size NxN. When I run it with a 6x6 map it works perfectly and prints…
josepdecid
  • 1,737
  • 14
  • 25
1
vote
1 answer

How to set up and Print out a Grid in GNU Prolog

I'm reading through these prolog tutorials and I feel like i'm getting a decent grasp on some of the concepts they use but i'm having an issue trying to implement a grid like system. I know I could set this up with a list, but so far i'm drawing…
Frontier
  • 139
  • 1
  • 4
  • 12
0
votes
0 answers

Tkinter does not display text in the grid after calling the method from another class

If I run the following code alone, it displays the text in the grid while running: def solve_wumpus_world(master, world_file): world = World() world.generate_world(world_file) label_grid = [[Grid_Label(master, i, j) for j in…
Ahmad
  • 1
  • 1
0
votes
1 answer

How to generate a list of available steps on a grid?

I have a 5x5 grid which is described by max_size(5, 5). I need to generate a list of all cells from that description using DCG. Here's the code I have so far: :- use_module(library(clpfd)). map_size(5, 5). natnum(0). natnum(X) :- X #= X0 + 1, …
Radical Ed
  • 178
  • 2
  • 13
0
votes
1 answer

How do I know my vertex has a connection?

I am making a Hunt the Wumpus game using the graph data structure. Each vertex in it is an array of size 4 to represent each direction, north south east west. The directions are stored in an enum. When one vertex is connected with another, its…
Subwoofer
  • 7
  • 4
0
votes
1 answer

Prolog Wumpus How to find a path in an unknown maze

How to find a path in an unknown maze in prolog? I am having initial position and no. of rows and columns, but no end position and I cannot give the rows*columns as end as I have to move recursively to find Wumpus, pit ,wall and an empty space in a…
0
votes
0 answers

At most one wumpus: Wumpus AI Project

I am not able to use join with ' & ' with list operand. Any help would be appreciated! def axiom_generator_at_most_one_wumpus(xmin, xmax, ymin, ymax): """ Assert that there is at at most one Wumpus. xmin, xmax, ymin, ymax := the bounds…
0
votes
0 answers

prolog successor state axiom ERROR: Out of local stack

I am trying to formulate a successor state axiom for an agent that moves (north,south,west,east) in a 4x4 grid. The grid has two obstacles at 1,1 and 2,2 and the initial position of the agent is 3,3. The agent should reach the the teleportal which…
0
votes
2 answers

Process List in Prolog

I'm having trouble using lists in Prolog. I am implementing a Wumpus World example and need to move the wumpus during each user movement. The movement for the wumpus is predefined in a list, and I have no idea how to pop off the head of the list to…
James Brown
  • 919
  • 3
  • 13
  • 22
0
votes
1 answer

Confusion in the Wumpus World model?

The Wumpus World is an example for Knowledge Representation, Reasoning, and Planning- in which an agent had to explore a cave made up from a series of interconnected rooms. In one of the rooms in the cave, there was a Wumpus which would kill the…
Ghost
  • 1,777
  • 6
  • 31
  • 44
-1
votes
2 answers

Using Bayes formula

suppose the cave system contains 100 caves, of which 90 caves are without a hidden treasure and 10 caves contain a buried gold object. In 70% of the caves with a hidden treasure, the Wumpus has left behind his usual stench from digging about and…