[m-users.] Mercury for Game AI

Tomas By tomas at basun.net
Thu Jan 20 03:10:10 AEDT 2022


On Wed, 19 Jan 2022 16:55:19 +0100, David Epstein wrote:
> Is the rule approach actually wrong (won't work) or just slower (an extra step) ?

It looks like an infinite loop?

> I thought the predicate approach was more native to Mercury/Prolog, no?
> If I want to express both:
> eventA = attack(bob,dan,bedroom,1)
> eventB = heard(carl,eventA,1)
> Would I want a graph data structure?

The problem is that there is no database. You cannot assert and
retract like in Prolog.

For example:

| ?? == map(int,event).
| :- type event ---> attack(person,person,location) ; heard(person,event).

/Tomas


More information about the users mailing list