Re: Wumpus World Question
Thomas Russ <[email protected]> Wed, 16 Apr 2008 09:22:38 -0700
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <[email protected]> |
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)
(=> (and (wumpuscell ?c) (neighbors ?c ?cn))
(smell ?cn))))