Knowledge

Production system (computer science)

Source đź“ť

231:(p Holds::Object-Ceiling {(goal ^status active ^type holds ^objid <O1>) <goal>} {(physical-object ^id <O1> ^weight light ^at <p> ^on ceiling) <object-1>} {(physical-object ^id ladder ^at <p> ^on floor) <object-2>} {(monkey ^on ladder ^holds NIL) <monkey>} -(physical-object ^on <O1>) --> (write (crlf) Grab <O1> (crlf)) (modify <object1> ^on NIL) (modify <monkey> ^holds <O1>) (modify <goal> ^status satisfied) ) 219:
In such a simple system, the ordering of the production rules is crucial. Often, the lack of control structure makes production systems difficult to design. It is, of course, possible to add control structure to the production systems model, namely in the inference engine, or in the working memory.
101:
or RHS) will update the agent's knowledge, removing or adding data to the working memory. The system stops processing either when the user interrupts the forward chaining loop; when a given number of cycles have been performed; when a "halt" RHS is executed, or when no rules have LHSs that are true.
285:
and Sadri argue that, because actions in production systems are understood as imperatives, production systems do not have a logical semantics. Their logic and computer language Logic Production System (LPS) combines logic programs, interpreted as an agent's beliefs, with reactive rules, interpreted
238:
Production rules in OPS5 apply to all instances of data structures that match conditions and conform to variable bindings. In this example, should several objects be suspended from the ceiling, each with a different ladder nearby supporting an empty-handed monkey, the conflict set would contain as
242:
The binding of variables resulting from the pattern matching in the LHS is used in the RHS to refer to the data to be modified. The working memory contains explicit control structure data in the form of "goal" data structure instances. In the example, once a monkey holds the suspended object, the
286:
as an agent's goals. They argue that reactive rules in LPS give a logical semantics to production rules, which they otherwise lack. In the following example, lines 1-3 are type declarations, 4 describes the initial state, 5 is a reactive rule, 6-7 are logic program clauses, and 8 is a causal law:
205:
In this example, production rules are chosen for testing according to their order in this production list. For each rule, the input string is examined from left to right with a moving window to find a match with the LHS of the production rule. When a match is found, the matched substring in the
234:
In this example, data in working memory is structured and variables appear between angle brackets. The name of the data structure, such as "goal" and "physical-object", is the first literal in conditions; the fields of a structure are prefixed with "^". The "-" indicates a negative condition.
171:
Here again, such strategies may vary from the simple—use the order in which production rules were written; assign weights or priorities to production rules and sort the conflict set accordingly—to the complex—sort the conflict set according to the times at which production rules were previously
293:
Notice in this example that the reactive rule on line 5 is triggered, just like a production rule, but this time its conclusion deal_with_fire becomes a goal to be reduced to sub-goals using the logic programs on lines 6-7. These subgoals are actions (line 2), at least one of which needs to be
289:
1. fluents fire. 2. actions eliminate, escape. 3. events deal_with_fire. 4. initially fire. 5. if fire then deal_with_fire. 6. deal_with_fire if eliminate. 7. deal_with_fire if escape. 8. eliminate terminates fire.
172:
fired; or according to the extent of the modifications induced by their RHSs. Whichever conflict resolution strategy is implemented, the method is indeed crucial to the efficiency and correctness of the production system. Some systems simply fire all matching productions.
105:
Real-time and expert systems, in contrast, often have to choose between mutually exclusive productions—since actions take time, only one action can be taken, or (in the case of an expert system) recommended. In such systems, the rule interpreter, or
126:
algorithm that collects production rules with matched conditions may range from the naive—trying all rules in sequence, stopping at the first match—to the optimized, in which rules are "compiled" into a network of inter-related conditions.
494: 31:, which consists primarily of a set of rules about behavior, but it also includes the mechanism necessary to follow those rules as the system responds to states of the world. Those rules, termed 74:, which maintains data about the current state or knowledge, and a rule interpreter. The rule interpreter must provide a mechanism for prioritizing productions when more than one is triggered. 228:
In a toy simulation world where a monkey in a room can grab different objects and climb on others, an example production rule to grab an object suspended from the ceiling would look like:
239:
many production rule instances derived from the same production "Holds::Object-Ceiling". The conflict resolution step would later select which production instances to fire.
216:$ ABC (P6) B$ AC (P5) BC$ A (P5) $ BC$ A (P6) C$ B$ A (P5) $ C$ B$ A (P6) $ $ C$ B$ A (P6) *C$ B$ A (P1) C*$ B$ A (P3) C*B$ A (P2) CB*$ A (P3) CB*A (P2) CBA* (P3) CBA (P4) 110:, cycles through two steps: matching production rules against the database, followed by selecting which of the matched rules to apply and executing the selected actions. 199:
This example shows a set of production rules for reversing a string from an alphabet that does not contain the symbols "$ " and "*" (which are used as marker symbols).
384: 54:
Productions consist of two parts: a sensory precondition (or "IF" statement) and an action (or "THEN"). If a production's precondition matches the current
397:
Shapiro, S. (2001). Review of Knowledge representation: logical, philosophical, and computational foundations. Computational Linguistics, 2(2), 286-294
97:
In idealized or data-oriented production systems, there is an assumption that any triggered conditions should be executed: the consequent actions (
485: 261: 337: 119: 243:
status of the goal is set to "satisfied" and the same production rule can no longer apply as its first condition fails.
86:
algorithm for selecting productions to execute to meet current goals, which can include updating the system's data or
510: 460: 40: 210:
matching any character of the input string alphabet. Matching resumes with P1 once the replacement has been made.
202:
P1: $ $ -> * P2: *$ -> * P3: *x -> x* P4: * -> null & halt P5: $ xy -> y$ x P6: null -> $
213:
The string "ABC", for instance, undergoes the following sequence of transformations under these production rules:
146:
in the early 1980s. OPS5 may be viewed as a full-fledged programming language for production system programming.
557: 359: 17: 164: 567: 587: 532: 522: 139: 407:
Kowalski, Robert; Sadri, Fariba (12 January 2009). "LPS - A Logic-based Production System Framework".
327: 303: 206:
input string is replaced with the RHS of the production rule. In this production system, x and y are
181: 425: 55: 36: 592: 187:
rules to the modeling of human cognitive processes, from term rewriting and reduction systems to
28: 138:
in1974, which is used in a series of production systems, called OPS and originally developed at
412: 154:
Production systems may also differ in the final selection of production rules to execute, or
63: 8: 158:. The collection of rules resulting from the previous matching algorithm is called the 87: 537: 506: 456: 252: 542: 123: 107: 83: 48: 24: 467: 282: 278: 572: 562: 495:
Knowledge representation: logical, philosophical, and computational foundations
271:
Knowledge Representation: Logical, Philosophical, and Computational Foundations
131: 71: 44: 581: 527: 343: 281:, reviewing Sowa's book, argues that this is a misrepresentation. Similarly, 188: 135: 266: 256: 194: 184: 547: 476: 113: 94:
or LHS) is tested against the current state of the working memory.
70:. A production system also contains a database, sometimes called 363: 330:: a rule engine for the Java platform - it is a superset of the 349: 315: 277:
that perform reasoning by means of forward chaining. However,
355: 331: 309: 274: 552: 480:. Theory and Practice of Logic Programming, 16(3), 269-295. 321: 143: 439: 312:: public domain software tool for building expert systems. 318:: an open-source business rule management system (BRMS). 23:
A "production system" (or "production rule system") is a
366:: cognitive architectures based on a production system. 122:
of conditions in production rules. Accordingly, the
468:
Production System Models of Learning and Development
195:
A simple string rewriting production system example
149: 223: 180:The use of production systems varies from simple 579: 114:Matching production rules against working memory 58:of the world, then the production is said to be 352:: a general purpose logic programming language. 477:Programming in logic without logic programming 465:Klahr, D., Langley, P. and Neches, R. (1987). 346:: business centric rules and open source BRMS. 273:characterize production systems as systems of 406: 162:, and the selection process is also called a 451:Brownston, L., Farrell R., Kant E. (1985). 175: 498:(Vol. 13). Pacific Grove, CA: Brooks/Cole. 486:Artificial Intelligence: A Modern Approach 262:Artificial Intelligence: A Modern Approach 246: 455:Reading, Massachusetts: Addison-Wesley. 501:Waterman, D.A., Hayes-Roth, F. (1978). 340:: a rule engine written in Common Lisp. 90:. The condition portion of each rule ( 27:typically used to provide some form of 580: 82:Rule interpreters generally execute a 483:Russell, S.J. and Norvig, P. (2016). 440:"LPS | Logic Production Systems" 324:: a business rule management system. 474:Kowalski, R. and Sadri, F. (2016). 118:Production systems may vary on the 13: 503:Pattern-Directed Inference Systems 471:. Cambridge, Mass.: The MIT Press. 453:Programming Expert Systems in OPS5 306:: rule-based programming language. 297: 77: 14: 604: 130:The latter is illustrated by the 150:Choosing which rules to evaluate 224:An OPS5 production rule example 558:Production Rule Representation 432: 400: 391: 377: 294:executed to satisfy the goal. 62:. If a production's action is 1: 489:. Pearson Education Limited. 370: 18:Production (computer science) 165:conflict resolution strategy 7: 568:Rule-based machine learning 516: 10: 609: 533:Learning Classifier System 523:Action selection mechanism 505:New York: Academic Press. 140:Carnegie Mellon University 15: 304:Constraint Handling Rules 176:Using production systems 16:Not to be confused with 247:Relationship with logic 29:artificial intelligence 420:Cite journal requires 385:"Drools Documentation" 334:programming language. 66:, it is said to have 492:Sowa, J.F. (2000). 41:automated planning 588:Logic programming 538:Logic programming 600: 543:Inference engine 444: 443: 436: 430: 429: 423: 418: 416: 408: 404: 398: 395: 389: 388: 381: 136:Charles L. Forgy 124:pattern matching 120:expressive power 108:inference engine 84:forward chaining 49:action selection 39:found useful in 25:computer program 608: 607: 603: 602: 601: 599: 598: 597: 578: 577: 519: 448: 447: 438: 437: 433: 421: 419: 410: 409: 405: 401: 396: 392: 383: 382: 378: 373: 300: 298:Related systems 291: 279:Stewart Shapiro 249: 232: 226: 217: 203: 197: 178: 152: 142:culminating in 116: 99:right-hand side 80: 78:Basic operation 21: 12: 11: 5: 606: 596: 595: 593:Expert systems 590: 576: 575: 573:Term rewriting 570: 565: 563:Rete algorithm 560: 555: 550: 545: 540: 535: 530: 525: 518: 515: 514: 513: 499: 490: 481: 472: 463: 446: 445: 431: 422:|journal= 399: 390: 375: 374: 372: 369: 368: 367: 353: 347: 341: 335: 325: 319: 313: 307: 299: 296: 288: 248: 245: 230: 225: 222: 215: 201: 196: 193: 189:expert systems 177: 174: 151: 148: 134:, designed by 132:Rete algorithm 115: 112: 92:left-hand side 79: 76: 72:working memory 45:expert systems 37:representation 35:, are a basic 9: 6: 4: 3: 2: 605: 594: 591: 589: 586: 585: 583: 574: 571: 569: 566: 564: 561: 559: 556: 554: 551: 549: 546: 544: 541: 539: 536: 534: 531: 529: 528:Expert system 526: 524: 521: 520: 512: 511:0-12-737550-3 508: 504: 500: 497: 496: 491: 488: 487: 482: 479: 478: 473: 470: 469: 464: 462: 461:0-201-10647-7 458: 454: 450: 449: 441: 435: 427: 414: 403: 394: 386: 380: 376: 365: 361: 357: 354: 351: 348: 345: 344:OpenL Tablets 342: 339: 336: 333: 329: 326: 323: 320: 317: 314: 311: 308: 305: 302: 301: 295: 287: 284: 280: 276: 272: 268: 264: 263: 258: 254: 244: 240: 236: 229: 221: 214: 211: 209: 200: 192: 190: 186: 183: 173: 169: 167: 166: 161: 160:conflict set 157: 147: 145: 141: 137: 133: 128: 125: 121: 111: 109: 103: 100: 95: 93: 89: 85: 75: 73: 69: 65: 61: 57: 52: 50: 46: 42: 38: 34: 30: 26: 19: 502: 493: 484: 475: 466: 452: 434: 413:cite journal 402: 393: 379: 316:JBoss Drools 292: 270: 260: 250: 241: 237: 233: 227: 218: 212: 207: 204: 198: 179: 170: 163: 159: 155: 153: 129: 117: 104: 98: 96: 91: 81: 67: 59: 53: 32: 22: 33:productions 582:Categories 371:References 322:ILOG rules 208:variables 267:John Sowa 185:rewriting 60:triggered 548:L-system 517:See also 283:Kowalski 64:executed 364:OpenCog 253:Russell 88:beliefs 509:  459:  350:Prolog 257:Norvig 182:string 356:ACT-R 332:CLIPS 310:CLIPS 275:logic 251:Both 68:fired 56:state 553:OPS5 507:ISBN 457:ISBN 426:help 360:Soar 338:Lisa 328:JESS 265:and 255:and 156:fire 144:OPS5 47:and 269:'s 259:'s 584:: 417:: 415:}} 411:{{ 362:, 358:, 191:. 168:. 51:. 43:, 442:. 428:) 424:( 387:. 20:.

Index

Production (computer science)
computer program
artificial intelligence
representation
automated planning
expert systems
action selection
state
executed
working memory
forward chaining
beliefs
inference engine
expressive power
pattern matching
Rete algorithm
Charles L. Forgy
Carnegie Mellon University
OPS5
conflict resolution strategy
string
rewriting
expert systems
Russell
Norvig
Artificial Intelligence: A Modern Approach
John Sowa
logic
Stewart Shapiro
Kowalski

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑