|
Post by sumedhghaisas on Jun 28, 2014 13:27:09 GMT -8
Is it possible to achieve some optimization in knowledge base by reordering premisses in the clause??
for example (<= (test ?x) (test2 ?x) (test3 ?x) (test4 ?x))
is there any way optimize this clause by reordering positions of test2, test3, and test4. I guess this will be specific to what type of knowledge base is it, forward chaining or backward chaining. If this optimization is possible what is the method for optimizing??
|
|
|
Post by alandau on Jun 28, 2014 16:23:26 GMT -8
Performance certainly depends on the ordering, but that's going to depend heavily on the implementation of your rules engine. The details of how you use caching, for example, can have a big impact on which ordering is best. For propnet generation, this shouldn't majorly affect the generated propnet but may affect how long it takes to create it. OPNF does some fancy stuff to select an ordering that should be efficient for going through the possible assignments and skipping the impossible ones. (See the AssignmentsFactory in GGP-Base and the other classes in that package if you're interested, though the code is probably hard to understand.) It may or may not be applicable for other forward-chaining approaches (I haven't tried it yet). The collection of games includes both a "minichess" and a "minichess-evilconjuncts", the latter of which only differs by reordering conjuncts in the rules to make it less performant: games.ggp.org/base/games/minichess/minichess.kifgames.ggp.org/base/games/minichess-evilconjuncts/minichess-evilconjuncts.kif
|
|