<div dir="ltr"><div dir="ltr"><div>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:</div><div><br></div><div>
<div>person(bob)</div><div>hiding(bob)</div><div>vulnerable(Person) :- not(hiding(Person))</div>
</div><div></div><div><br></div><div>I could accomplish this with lists or dictionaries in C# to represent people, hiding people, vulnerable people, etc and maintain validity by checking who is hiding and changing who is vulnerable. But, Prolog (and perhaps Mercury) can do all that automatically if I just query vulnerable(bob). Furthermore, the system can explain to me why he is vulnerable (because he is not hiding) or not vulnerable (because he is hiding). <b>Julien</b>, in the fruitbowl example, I'm worried that we lose this functionality because the predicates have become just values in a map. If there were further rules about fruits, would those rules still work? <b>M. McDonough</b>, could you explain how you change game state while
avoiding changing Mercury predicate definitions? Did relying on data structures like lists and maps still permit you to leverage traditional logic programming approaches?</div><div><br></div><div>-david<br></div><div></div><br></div></div>