4 ms·
Oh yeah, encoding game rules is a killer app for Prolog's declarative style. See my sibling comment- I've done this with M:tG and WH40k. With M:tG in particular
by YeGoblynQueenne 4y ago
Oh yeah, encoding game rules is a killer app for Prolog's declarative style. See my sibling comment- I've done this with M:tG and WH40k. With M:tG in particular, translating from the rulebook to Prolog, to code a rules engine, is a breeze, just because the M:tG rules are in such strict, formal language already.
The jump from a well-written, unambiguous and precise set of board game rules and its translation in Prolog is a tiny step, that could even be automated with some elbow grease.
Now, you mention "rendering" and that, on the other hand, I'm not sure is a very good application for Prolog. Nothing to do with speed, but arithmetic in Prolog is a bit meh, and if you want to do stuff like matrix arithmetic, you have to roll your own. Most Prologs don't even have arrays, as such (they kind of do but it's a bit of a hack).