I'm building a card game called Tijari (uses 40 Spanish cards deck, quite similar to Bridge) as an Expert System. This is all part of my doctoral thesis.
I'm having a hard time finding a good balance between Prolog code and Java code, what would go where and why. The game must let human players play against the AI as well as against each other, so you can have a team of (Human + AI) vs (AI + AI) or (Human + Human) vs (Human + Human) or anything in between.
While Prolog is defined as being about facts and rules, most uses I see of it are not really what you would call logic programming but actually awkward programming trying to implement sometimes complex algorithms under the constraints and intricacies of the language: shuffles, search and complex list operations. Why?
There are some uses of Prolog that a language like Java cannot provide easily like when it comes to deduction based on existing rules and facts and the ability to query for information, still, I generally cannot seem to be able to justify its use.
Is it the fact that it encodes domain knowledge in logic? Well, any real-world Prolog program seems harder to read than plain Java code because of backtracking, cuts and recursion.
Is it the fact that it doesn't require a software developer to encode domain knowledge, just a domain expert? Well not really, you would still need a domain expert who is well versed in Prolog.
Is it the fact that you can easily modify the rules and facts without needing recompilation? Well, any scripting language can offer that really.
Is it the fact that it can easily evolve as domain knowledge evolves? Well, I believe that domain knowledge doesn't evolve that much for it to be a problem, and when it does, software follows, that is why it has always been.
I honestly have a hard time justifying the use of Prolog as the only language in which an Expert System (and here a game) must be built, and when it's not, when you end up using a combination of Java and Prolog, where should the line be?
Thanks