Poivo | 16 Apr 2008 10:25
Picon
Favicon

Wumpus World Question


In a simple wumpus world rappresentation(Wumpus world is an N x N board game
with a number of wumpuses and treasures that are randomly placed in various
cells. Wumpuses emit smell and treasures glitter. Smell and glitter can be
sensed in the horizontal and vertical neighbors of the cell containing a
wumpus or a treasure. In this simple model pits aren't present.) how to
assert  "A cell containing a wumpus impiles all neighbors of that cell
smell"?
I already have defined these following relations:
(defconcept Cell (?c))
(defrelation Neighbors ((?c1 Cell) (?c2 Cell)))
(defconcept WumpusCell (?c))
(defconcept Smell (?c Cella) :<=> (exists ?c1 (and (WumpusCell ?c1)
(Neighbors ?c ?c1))))
--

-- 
View this message in context: http://www.nabble.com/Wumpus-World-Question-tp16718701p16718701.html
Sent from the PowerLoom mailing list archive at Nabble.com.
Thomas Russ | 16 Apr 2008 18:22
Picon
Favicon

Re: Wumpus World Question

Ah yes, the wumpus.  I remember it from the PDP-10....

On Apr 16, 2008, at 1:25 AM, Poivo wrote:
>
> In a simple wumpus world rappresentation(Wumpus world is an N x N  
> board game
> with a number of wumpuses and treasures that are randomly placed in  
> various
> cells. Wumpuses emit smell and treasures glitter. Smell and glitter  
> can be
> sensed in the horizontal and vertical neighbors of the cell  
> containing a
> wumpus or a treasure. In this simple model pits aren't present.) how  
> to
> assert  "A cell containing a wumpus impiles all neighbors of that cell
> smell"?
> I already have defined these following relations:
> (defconcept Cell (?c))
> (defrelation Neighbors ((?c1 Cell) (?c2 Cell)))
> (defconcept WumpusCell (?c))
> (defconcept Smell (?c Cella) :<=> (exists ?c1 (and (WumpusCell ?c1)
> (Neighbors ?c ?c1))))

(assert (=> (and (wumpuscell ?c) (neighbors ?c ?cn))
             (smell ?cn)))

This takes advantage of the fact that the default quantification of  
rules in PowerLoom is universal, sparing you the need to be explicit:

(assert (forall (?c ?cn)
(Continue reading)

Poivo | 22 Apr 2008 10:10
Picon
Favicon

Re: Wumpus World Question


Thanks for the answers, it's working perfectly! Now with these defitions

(defconcept Cell (?c))
(defrelation Neighbors ((?c1 Cell) (?c2 Cell)))
(defconcept WumpusCell (?c))
(defconcept Smell (?c Cella) :<=> (exists ?c1 (and (WumpusCell ?c1)
(Neighbors ?c ?c1))))
(defconcept denywumpus (?c Cella) :<=> (exists ?c1 (and (adiacenti ?c ?c1)
(not (smell ?c1)))))

Powerloom can determine effects from causes, but not viceversa. As an
example: here's a simple rappresentation of the wumpus's 3x3 world:

(assert (Cell cella0))
(assert (Cell cella1))
(assert (Cell cella2))
(assert (Cell cella3))
(assert (Cell cella4))
(assert (Cell cella5))
(assert (Cell cella6))
(assert (Cell cella7))
(assert (Cell cella8))
(assert (Neighbors cell0 cell1))
(assert (Neighbors cell0 cell3))
...."for all Neighbors cell"...
(assert (Neighbors cella8 cella7))

Graphically speaking:
  __________________
(Continue reading)


Gmane