[m-users.] Mercury for Game AI
Fabrice Nicol
fabrnicol at gmail.com
Fri Jan 21 03:24:18 AEDT 2022
David's question, to some extent, revolves around how much reflective
programming can be done in Mercury and for what kind of uses.
In Prolog, lists can be converted to predicates and vice-versa
dynamically thanks to =.. ('univ'). Mercury's implementation of 'univ'
can only be partial and limited to static introspection, which is
supported to some extent by library predicates construct / deconstruct
(see library/prolog.m and the comments there).
The Mercury compiler code itself makes heavy use of these library
predicates (have a look at mercury/library/rtti_implementation.m, for one).
If you need to go beyond static introspection and make use of dynamic
intercession, as I understand you will in an interactive app like an AI
game, then you will be better off sticking with Prolog. SWI and Sicstus
are the only two dialects I know of that have a C# interface.
Fabrice
More information about the users
mailing list