[m-users.] Mercury for Game AI
Tomas By
tomas at basun.net
Mon Jan 24 00:21:54 AEDT 2022
On Sun, 23 Jan 2022 13:27:40 +0100, Tomas By wrote:
>
> On Sun, 23 Jan 2022 12:32:30 +0100, David Epstein wrote:
> > For me, the attraction of Prolog (and perhaps of Mercury) for game
> > AI is resolution via unification over a complex set of rules and
> > facts. For example, say bob is a person who is hiding. If he stops
> > hiding, he will become vulnerable:
> >
> > person(bob)
> > hiding(bob)
> > vulnerable(Person) :- not(hiding(Person))
>
>
> Assuming you mean that all this is dynamic data, then the main problem
> is that you need to keep track of the variable bindings (ie Person is
> the same in vulnerable/1 and in hiding/1).
Between clauses, that is. Two vars in the same clause, as above, will
be the same.
/Tomas
More information about the users
mailing list