Prolog is good for representing and dealing with facts and rules, and it’s good at working with tree and graph structures. Prolog should be used for graphics and art a lot more than it is (my current project “Got To Start Somewhere” is written in Prolog, as was the original version of “The Cybernetic Artwork Nobody Wrote”):
A simple model of narrative (expressed in Prolog).