[m-users.] Mercury for Game AI

Sean Charles (emacstheviking) objitsu at gmail.com
Fri Jan 21 19:49:49 AEDT 2022


Can we see these games anywhere? It’s on my lst once I finish my current project… to develop cross-platform games with at least the game logic in Mercury and, if possible (it is, the OpenGL/Cairo libraries) the UI framework as well.

I’d be really interested to see a game written in Mercury for sure!

Sean


> On 21 Jan 2022, at 08:21, M McDonough <foolkingcrown at gmail.com> wrote:
> 
> On Thu, 20 Jan 2022, David Epstein <davideps at umich.edu> wrote:
>> Thank you Zoltan and Fabrice.  I just need to maintain (add and remove)
>> facts before a query. This seems possible in Mercury through various data
>> structures in the standard library. I need to review Julien's fruitbowl
>> example again. He used lists to permit compiled Mercury to behave in a way
>> similar to redefining a predicate. However, I'm not sure how this is
>> different than just using those same data structures directly in C#.
> 
> I have written a number of games in Mercury, and I think the big
> benefits it has over C# for games are:
> 
> 1. Being functionally pure, it is relatively easy to write unit tests
> for the game without structuring your game specifically to allow it,
> which is usually very difficult for games. There is even a unit
> testing framework, "Transunit", built specifically for this use-case.
> 2. Writing AI/behavior for systems that like pathfinding or constraint
> solving is made very easy using multi/nondet facilities. This
> essentially automates the need to save previous states or handle
> "open"/"closed" solutions.
> 3. The expressive (and non-nullable) type system makes moving a system
> from prototyping/tech demo stages to its final stage much easier, as
> it turns run-time errors for missing data/logic into type or mode
> errors.
> 4. The mode system provides the most ideal way to perform guaranteed
> correct round-trip data translations, such as from on-disk to
> in-memory representations of data. This is extremely useful for
> writing reliable game data saving and game level/data loading systems.
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users



More information about the users mailing list