In the referenced article by Fowler, he makes a very important definition about the rules engine he writes his commentary regarding. He calls it a “Production Rule System” and his definition starts like this “the engine decides when to evaluate them (rules) using whatever order makes sense for it.”. That is a very important distinction as it implies black box behavior.
Yes, and I think it is an odd critique to make, because the whole point of an expert system is to outsource the order of operations to the system and free the author from the giant if hairball. I don’t agree with the notion that a relatively flat set of rule statements is harder to debug than nested statements. Certainly rules are much more maintainable than hairballs when changes are involved.
I don’t see how it implies black box behavior, though. Inform’s rule ordering behavior is well-documented, as is Dialog’s. You might not like one or the other, but that’s not the same as it being a black box.
Just for reference anything declared as a <condition> or <consequence> or indeed NPC actions in this system are evaluated in strictly the order authored. Nothing more, nothing less.
There’s no black box behaviour.
My remarks are strictly about using the Fowler piece as a blanket assumption that any rules based engine can be described like the rules engine that he describes in the article. That is all. That is why I felt the need to remark about implicit vs explicit.
Another day, another update.
This one updates verb handling flexibility quite a lot through declarative handler selection rules.
You can now declare how you handle the difference between PUT a IN b or PUT a ON (wear it) and PUT a ON b..
And more updates:
This release fully supports Internationalizable direction definitions.
So together with everything else I hope that means full localization support. I can’t be sure until someone attempts it though…
Also fixed a 12 hour clock set time issue - you couldn’t set a pm time for the initial game clock start time or as a setNewTime consequence. Only matters for the 12 hour clock because that’s the only one that has am/pm.
Also Cloak of Darkness needed a new event for the dark room Interceptor. Moving back out of the dark bar area fires an event if you have the interceptor defined - I defined the interceptor but not the event…
This whole ecosystem has matured a lot in the last month or two. It’s now really flexible and you can fully define the interpretations in the XML.
The important thing is the AdverbHandler, mapping a verb to that allows you to map different adverbs to more specific handlers. For example you can map LOOK AT to the ExamineHandler so it acts like EXAMINE|EXAM|X.
Other things can be mapped even according to some rules so if the sentence typed has has a target object then the mapping can be different from if there isn’t one - i.e. PUT x ON y as opposed to jst PUT x ON (or PUT ON x). The latter obviously means wear the item whereas the former is like HANG CLOAK ON HOOK.
(post deleted by author)
So of course internationalization isn’t that straightforward. This release makes the system fully compatible with most Latin type languages, French, Spanish, Italian etc should all work.
I’m yet to tackle Chinese and other Asiatic languages. There’s two chief difficulties as I understand it -
The first being, no spaces or other characters between words so individual words will have to be found as substrings (although that is made easier by the fact that a substring can’t be part of another word at least).
The second is nouns are likely to be omitted altogether from sentences when the context is already established. They don’t even use IT or anything so the current object has to be retained and inserted when needed.
I don’t see these as impossible goals but I’m happy for the time being where we are.
I’m going to work on generalising the trading text to fit in with the auxiliary messages system I’ve just added to help with generating pluralised or singular versions of output depending on object tags).
Trading isn’t very well documented at the moment so you probably didn’t even know about it!
See Appendix D for a discussion on Internationalization.