Printer Friendly
The Free Library
5,673,105 articles and books
Member login
User name  
Password 
 
Join us Forgot password?

Optimising Rete for low-memory, multi-agent systems.


ABSTRACT

Optimisations to the standard Rete algorithm The Rete algorithm is an efficient pattern matching algorithm for implementing production rule systems. The Rete algorithm was designed by Dr Charles L. Forgy of Carnegie Mellon University, first published in a working paper in 1974, and later elaborated in his 1979 Ph.D.  are presented as a means of bringing advanced, rule-based artificial intelligence techniques to low-memory systems--in particular, current and future generations of games consoles. A brief introduction to Rete and the issues involved in its implementing on low memory hardware is followed by a discussion of the solutions developed. By sharing resources it is possible to enable the algorithm to run efficiently on low memory machines. A brief overview of the implementation of a rule interpreter A high-level programming language translator that translates and runs the program at the same time. It translates one program statement into machine language, executes it, and then proceeds to the next statement.  which makes use of these optimisations is included.

KEYWORDS

Game AI, Rule-Based Languages, Rete, Optimisation Noun 1. optimisation - the act of rendering optimal; "the simultaneous optimization of growth and profitability"; "in an optimization problem we seek values of the variables that lead to an optimal value of the function that is to be optimized"; "to promote the , Agents.

INTRODUCTION

There are several reasons why a rule based See rules based.  system can be beneficial to the design of complex agent behaviour, including a declarative programming Declarative programming is a term with two distinct meanings, both of which are in current use.

According to one definition, a program is "declarative" if it describes what something is like, rather than how to create it.
 style allowing for easy maintenance and growth of the rule base, and facilities for rapid application development (RAD (1) (Rapid Application Development) Developing systems incrementally and delivering working pieces every three to four months, rather than waiting until the entire project is programmed before implementing it. ) offered by many rule programming environments[Jackson, 1999]. The flexibility of a rule based approach allows for complex characters to be created in computer games. However, rule based systems are sometimes inefficient and offer poor performance. The Rete[Forgy, 1982] algorithm forms the basis of a number of efficient rule based programming languages, such as OPS Ops (ŏps), in Roman religion, goddess of harvests. She was the wife of Saturn, by whom she bore Jupiter and Juno. At her festivals, the Opiconsivia and the Opalia, held in August and December, respectively, she was worshiped as a goddess of sowing 5[Forgy, 1981] and CLIPS CLIPS - C Language Integrated Production System [Giarratano, 2002]. The algorithm improves the performance of such systems, but at a price in terms of memory efficiency.

We have developed a rule interpreter based on the Rete algorithm, but with a number of implementation enhancements which aim to reduce the memory usage of the algorithm. The changes are based upon multiple agents sharing the resources of a single Rete and sharing representations of information about the environment. Traditionally, when several agents are developed using a rule based programming language, each is given its own Rete, and maintains a separate working memory. However, in many applications, agents share elements of behaviour to some degree (there may be a subset A group of commands or functions that do not include all the capabilities of the original specification. Software or hardware components designed for the subset will also work with the original.  of rules which is common to a group of agents). By allowing these agents to share the part of the Rete which corresponds to this common behaviour, some memory savings should be possible. In a similar way, agents may observe the same facts about the world, so it makes sense to try and share working memory elements representing these facts. The main theme of this paper is to investigate the extent to which sharing may be realised in an implementation of the Rete algorithm, and to evaluate the associated trade-offs and drawbacks.

In the next section, we present a brief background to the advantages and disadvantages of rule based programming for game artificial intelligence (AI), along with the discussion of the problems that Rete was designed to overcome, and some of the drawbacks that Rete suffers from. We then present the optimisations that we have developed, some ideas for building on these optimisations, and an overview of the system we have developed.

BACKGROUND

In a rule based system, patterns in a rule are matched against facts representing the current state, in order to determine actions to be taken. A typical use of such systems is in implementing agents which inhabit in·hab·it  
v. in·hab·it·ed, in·hab·it·ing, in·hab·its

v.tr.
1. To live or reside in.

2. To be present in; fill: Old childhood memories inhabit the attic.
 an environment. When a rule matches against the currently known facts, a series of actions associated with that rule is executed. Usually there are mechanisms to deal with more than one rule matching the environment (conflict resolution), and, often, some way to prioritise Verb 1. prioritise - assign a priority to; "we have too many things to do and must prioritize"
prioritize

grade, rate, rank, place, range, order - assign a rank or rating to; "how would you rank these students?"; "The restaurant is rated highly in the food
 rules. Actions can also cause changes to be made to the database of known facts, which in turn will cause different rules to be executed. An example of a rule and some facts which would cause the rule to fire are given below (in a simplified CLIPS syntax syntax: see grammar.
syntax

Arrangement of words in sentences, clauses, and phrases, and the study of the formation of sentences and the relationship of their component parts.
):
(defrule killed-enemy
    (enemy (name ?X) (health 0))
    (target (name ?X) (is-dead no))
=>
    (assert (target (is-dead? yes)
            (name ?X)))
)
(assert (target (name "Jon")
        (is-dead? no))
(assert (enemy (name "Jon)
        (health 0)))


The patterns come before the => symbol while the actions come after it. When the enemy is killed (health reaches zero), a fact indicating this is added to the working memory of the agent. The contents of working memory are then matched against the patterns in the rules to decide which action to perform next. The patterns show the layout of the facts which they match, using variables (denoted by a ? prefix The beginning or to add to the beginning. To prefix a header onto a packet means to place the header characters in front of the packet. "To prefix" at the beginning is the opposite of "to append" characters at the end. See prepend.

1.
) to extract information from the fields of the facts.

The heart of a rule based system is the matching engine which compares the currently known facts against the patterns contained in die rules. As there may be a very great number of rule patterns, and an even larger number of rapidly changing facts, it is crucial that this matching engine works as efficiently as possible, so that the agent may respond quickly to changing situations.

THE RETE ALGORITHM

The Rete algorithm was developed to solve the problem of quickly matching facts against rule patterns. It works by maintaining a cache of intermediate results generated during the matching process. For instance, in our example, a fact may be asserted which states that a certain enemy has become the current target. However, at this time, the enemy is not dead and so our rule will not be activated activated

a state of being more than usually active. In biological systems this is usually brought about by chemical or electrical means. Commonly said of pharmaceutical and chemical products.
. In a naive naive - Untutored in the perversities of some particular program or system; one who still tries to do things in an intuitive way, rather than the right way (in really good designs these coincide, but most designs aren't "really good" in the appropriate sense).  implementation of a rule system, we would keep comparing this fact against the rule pattern until both facts were asserted. In the Rete algorithm, however, the fact is matched once, and the value for the variable X is stored away. Later, if the other fact is asserted, then we simply compare the values for X from each match and if equal, then the rule is activated.

The Rete algorithm dramatically reduces the number of matches which have to be performed on each cycle by maintaining a directed graph directed graph - (digraph) A graph with one-way edges.

See also directed acyclic graph.
 data structure containing the cached information. The first level nodes in the graph are called alpha-nodes. Each alpha node represents a single pattern. Where there is more than one pattern in a rule, the alpha nodes are joined by beta-nodes which carry out unification (programming) unification - The generalisation of pattern matching that is the logic programming equivalent of instantiation in logic. When two terms are to be unified, they are compared.  between two nodes. Beta nodes are then joined by further beta nodes until a single node is reached. This final (terminal) node represents the complete rule.

When a fact is asserted, a token is created and passed into the alpha nodes of the Rete which deal with this type of fact. The token is a wrapper A data structure or software that contains ("wraps around") other data or software, so that the contained elements can exist in the newer system. The term is often used with component software, where a wrapper is placed around a legacy routine to make it behave like an object.  around the fact and contains extra information such as whether the fact is being asserted or retracted re·tract  
v. re·tract·ed, re·tract·ing, re·tracts

v.tr.
1. To take back; disavow: refused to retract the statement.

2.
. If the token matches the pattern in an alpha node, then it is passed on to the next node, while the value of any variables in the pattern are stored in a table, called a node-memory. The beta-nodes take rows from the tables of the alpha nodes and try to join them together, making sure that variables with the same name are assigned as·sign  
tr.v. as·signed, as·sign·ing, as·signs
1. To set apart for a particular purpose; designate: assigned a day for the inspection.

2.
 the same value. For instance, if a row in one table contains the values A=1, B=2, and a row in another table contains the values A=1, C=3, then a new row will be created in the table of the beta-node containing the values A=1, B=2, C=3, and the token is passed on. If the values for A had been different then this row would not have been created, and the token would not have been passed on. When a token has passed all the way through the Rete it emerges at a terminal node terminal node - leaf  which represents a particular rule. For a token to reach a terminal node, all the patterns in that rule must have matched, and so the rule can be activated. See figure 1 for an example. The key advantage of Rete is that rule conditions are only re-evaluated when a fact is asserted or deleted Deleted

A security that is no longer included on a specified market. Sometimes referred to as "delisted".

Notes:
Reasons for delisting include violating regulations, failing to meet financial specifications set out by the stock exchange and going bankrupt.
. In this way, asserting a new fact is simply a case of passing a token through the network, and a smaller number of matching operations are performed. In a naive implementation, each new fact would be compared against every single pattern of every rule, which means a greater time complexity. Retracting a fact is identical to assertion, but items are removed from node memories.

However, the Rete algorithm has been criticised, as it uses a large amount of memory in order to maintain this cache of intermediate results. The algorithm doesn't scale-up well to large rule databases, as the memory usage increases dramatically. The space complexity of Rete is of the order of O(RFP (Request For Proposal) A document that invites a vendor to submit a bid for hardware, software and/or services. It may provide a general or very detailed specification of the system.

1. (business) RFP - Request for Proposal.
2.
), where R is the number of rules, F is the number of asserted facts, and P is the average number of patterns per rule, compared to just O(F) for a naive implementation of a rule-based system without Rete. This also inhibits its use in low-memory systems, such as computer games consoles. In addition, the Rete algorithm is designed primarily for single agent systems--traditionally, each agent would have a separate Rete and maintain a separate working memory, and yet many agents may share similar rules. In order to improve the memory efficiency of Rete, a few other algorithms have been developed. These include TREAT[Miranker, 1987], which removes beta-nodes and recalculates caches as needed as needed prn. See prn order. , and the more recent Rete*[Wright and Marshall, 2003] which has TREAT as a special case, and allows for a degree of control over the trade-off between memory consumption and matching speed. These algorithms have had varying degrees of success--for a comparison of Rete and TREAT and a discussion of the issues involved see [Nayak et al., 1988]. However, there are a number of implementation optimisations which can be used to reduce the memory overhead of the original Rete algorithm. This paper briefly documents a few such optimisations developed as part of a project to develop a low-memory, multi-agent rule interpreter for use in console games
This article is about games played on consoles. Video gaming is about this form of gaming in general.


A console game is a form of interactive multimedia used for entertainment.
.

OPTIMISING RETE

The techniques discussed are based on the following observations:

** Rete networks are expensive in terms of memory usage.

** Agents often have identical rules.

** Different facts may contain the same data.

** Several agents may observe the same fact.

** A fact which was true once may well become true again in the future.

A number of different implementation optimisations can be developed based on these observations. The key principle in all of the techniques is to try and maximise sharing of resources in the Rete, without too much of a speed penalty being introduced. We have developed solutions based on three main areas:

** Sharing the Rete between several agents--i.e. sharing the rule structures.

** Sharing working memory items (facts) between agents.

** Sharing values of fields between facts, and between elements of node memories in the Rete.

Bit-strings are used within our implementation of Rete to flag the validity of facts or rules for particular agents--a setting of 1 in a particular bit position shows the validity of this item for the agent which owns this bit position.

Sharing Rules

By using bit-strings we can use a single Rete to represent the rules of multiple types of agent. This works by assigning as·sign  
tr.v. as·signed, as·sign·ing, as·signs
1. To set apart for a particular purpose; designate: assigned a day for the inspection.

2.
 a unique bit-mask to each agent, which has a single bit set in it, and assigning bit values to nodes in the Rete as Rete A (now as All Music) is an Italian free-to-air television station which broadcasts videos and music programmes 24 hours a day. In late 2004 the former owner, Gruppo Editoriale Peruzzo, sold the network to Gruppo Editoriale l'Espresso/La Repubblica.  rules are compiled. With this method we can restrict the path that a token can take through the network, depending on which agent has asserted the fact. When the token is passed through the network, an additional check is performed at each node to see if the agent which is asserting the fact has this rule as part of its behaviour. The check is a simple bit-wise AND operation of the bit-string of the node and the bit-string of the agent. If the result is non-zero then the node is valid for this agent. If a node (or even a whole rule) is shared between two or more agents, then we simply perform a bit-wise OR operation of the strings of each agent, and the resulting bit-string is stored in the node. See Figure 2 for an example. The main benefit of having one Rete network (with n agent masks controlling access to parts of the structure) rather than having n separate Rete networks (and so, no masks needed) is that in this way many individual rules can be shared among agents. Typically, the size of the structures which represent a rule in the Rete (p alpha nodes, and p-1 beta nodes, where p is the number of patterns in the left-hand side left-hand side nizquierda

left-hand side left nlinke Seite f

left-hand side nlato or
 of the rule) would be much greater than the combined size of the bit-strings needed (one for each node, so 2p-1 bit-strings, typically 4 bytes each) (a full cost analysis of Rete is given in [Wright and Marshall, 2003]). It thus makes sense to use the bit-strings, rather than duplicate DUPLICATE. The double of anything.
     2. It is usually applied to agreements, letters, receipts, and the like, when two originals are made of either of them. Each copy has the same effect.
 an entire rule. It is possible to reduce the overhead of bit-strings further by only marking alpha-nodes in this way, and assuming that once a token has passed an alpha node it is contained within the structure of a particular rule, and so cannot be passed to an invalid Null; void; without force or effect; lacking in authority.

For example, a will that has not been properly witnessed is invalid and unenforceable.


INVALID. In a physical sense, it is that which is wanting force; in a figurative sense, it signifies that which has no effect.
 node. This assumption only holds, however, if no sharing of nodes between rules is performed. However, some systems, such as Jess jesse, jess

a leather strap placed around each shank of a hawk used for hunting, for the attachment of a leash.
[Friedman-Hill, 2000] do share nodes between rules (see http://herzberg.ca.sandia.gov/jess/docs/52/rete.html for details), and so it would be necessary to mark all beta nodes as well.

The above analysis demonstrates why it is useful to share rules. However, not all rules will be shared (it is quite likely that some agents will have unique behaviour). As there is no way to descriminate between shared and unshared rules, all must have bit-strings applied to the associated nodes in the Rete. It is clear that if very little or no sharing is actually occurring, then the bit-strings are redundant and their cost becomes an issue (the goal is to reduce memory consumption, not add to it). The point at which sharing rules becomes a problem is the point at which the memory cost of the bit-strings (in the entire Rete) is greater than the memory saved by sharing rules, i.e. when:

rs(2p-1) [greater than or equal to] n(ap + b(p - 1))

where,

r = number of rules compiled into Rete,

s = size of a single bit-string,

p = average number of patterns in a rule,

n = number of shared rules (see below),

a = typical size of an alpha node,

b = typical size of a beta node.

A shared rule, as used above, is one which has no individual representation in the Rete, but uses an existing representation of an indentical rule (from a different agent). In this way, we measure only the memory saved--each shared rule must rely on one compiled rule, which does take up memory. In other words Adv. 1. in other words - otherwise stated; "in other words, we are broke"
put differently
, if we add three identical rules to the Rete (and no identical rule already exists), then we have increased the value of r by 1 and the value of n by 2.

By changing the relation to equality, we can calculate the ratio of shared rules to compiled rules (n/r) that marks the lower bound for rule sharing to be cost effective:

n/r = s(2p-1)/[ap + b(p-1)]

As an example, if we assume an average of 5 patterns per rule, take the size of a bit-string to be 4 bytes (an unsigned unsigned
Adjective

(of a letter etc.) anonymous

Adj. 1. unsigned - lacking a signature; "the message was typewritten and unsigned"
signed - having a handwritten signature; "a signed letter"
 int), and the size of alpha and beta nodes to be 100 bytes each (a conservative estimate), then the ratio needed is:

n/r = [4 x (2 x 5 - 1)]/[100 x 5 + 100 x (5 - 1)] = 36/900 = 1/25

So, in order for sharing to be effective in this example, there would have to be at least one shared rule for every 25 compiled into the rete. It seems quite likely that this could be achieved in a real application, for example, opponents in first-person shooter Editing of this page by unregistered or newly registered users is currently disabled.  (FPS (Frames Per Second) The measurement of full-motion video performance. See frame.

fps - frames per second
) games such as Unreal Tournament This article needs copy editing for grammar, style, cohesion, tone and/or spelling.
You can assist by [ editing it] now.
 often exhibit identical, or very similar, behaviour in a given situation.

It is easy to adapt the relation to show the total amount of memory that would be saved by sharing in a particular situation. That is given by the amount of memory saved, minus the overhead of using bitstrings:

[M.sub.saved] = n(ap + b(p - 1)) - rs(2p - 1)

So, using the values above, with 50 compiled rules, and 5 un-compiled (shared) rules, the amount of memory shared would be:

5 x (100 x 5 + 100 x 4) - 50 x 4 x (2 x 4) = 2900bytes

while the cost of the Rete in this example would be around 45000 bytes (50 x (100 x 5 + 100 x 4)), giving approximately a 6% saving, from a system with approximately 9% sharing (5/50).

In evaluating the utility of sharing rules, we must also consider the added time required to check the bit-strings when processing a token in the Rete. The checks involve a single simple bitwise operation In computer programming, a bitwise operation operates on one or two bit patterns or binary numerals at the level of their individual bits. On many computers, bitwise operations are slightly faster than addition and subtraction operations and significantly faster than multiplication  for each node visited. Compared to the pattern matching 1. pattern matching - A function is defined to take arguments of a particular type, form or value. When applying the function to its actual arguments it is necessary to match the type, form or value of the actual arguments against the formal arguments in some definition.  and join operations which take place in each node, this extra (very fast) operation should be insignificant. The combined Rete which represents the rules of every agent is likely to be significantly more complex than a Rete which represents just one agent (as there are more rules compiled into it). However, the bit-strings effectively limit the nodes that a token can visit, and so the traversal Crossing over. Passing through. See NAT traversal.

(data) traversal - Processing nodes in a graph one at a time, usually in some specified order. Traversal of a tree is recursively defined to mean visiting the root node and traversing its children.
 is not significantly more complex.

Sharing Facts

In a similar way, it is possible to share working memory items amongst several agents. When an agent asserts a new fact, its bit-string is stored with the fact. If another agent asserts the same fact, then its bit-string is combined with the current fact bit-string, using an OR operation, and the resulting string becomes the new fact bit-string. When unification takes place in beta-nodes, the bit-strings associated with each constituent CONSTITUENT. He who gives authority to another to act for him. 1 Bouv. Inst. n. 893.
     2. The constituent is bound with whatever his attorney does by virtue of his authority.
 token are combined using an AND operation, and this result is stored with the node memory. In this way, the new bit-string represents only those agents which knew every fact that was involved in the unification. If this process results in a zero-valued bit-string, then the unification is not valid for any agent, and so can be discarded dis·card  
v. dis·card·ed, dis·card·ing, dis·cards

v.tr.
1. To throw away; reject.

2.
a. To throw out (a playing card) from one's hand.

b.
. (Alternatively, the result can be kept in the anticipation that the conditions may become true for some agent in the near future. A separate garbage-collection sweep can be scheduled to collect zero-valued memory elements when memory is tight.)

We can calculate the expected space savings of using bit-strings with facts in the same way as we did before for rules. In this case, the total amount of memory that facts added to the Rete take up is given by:

rf([alpha]p + [beta](p - 1))

where,

r = number of rules compiled into Rete,

f = number of asserted facts,

p = average number of patterns in a rule,

[alpha] = typical size of an alpha memory element,

[beta] = typical size of a beta memory element.

This assumes the worst case situation, where each fact causes an item to be added to every node memory (which is unlikely). The space taken up by adding bit-strings to facts is FACTS I Federal Agencies' Centralized Trial-Balance System  given simply by the space of assigning a bit-string to each fact, and the space required for storing bit-strings in alpha and beta nodes.

sf + rsf(2p - 1)

where s is the size of the bit-string, as before. So, the point at which sharing facts becomes cost effective, memory-wise, is the point at which:

rg([alpha]p + [beta](p - 1)) [greater than or equal to] sf + rsf(2p - 1)

where g is the number of shared facts. The memory saved in a particular situation is then given by:

[M.sub.saved] = rg([alpha]p + [beta](p - 1)) - (sf + rsf(2p - 1))

As a worked example, assume p = 5 and s = 4 bytes as before, a Rete with 50 rules, 20 facts, and 5 shared facts, and take [alpha] and [beta] to be 4 bytes. Then the memory saved would be:

50 x 5 x (4 x 5 + 4 x 4) - (4 x 20 x 20 + 50 x 4 x 9) = 5600bytes

However, there are some drawbacks to this approach. The first (and most obvious) is how to tell whether two facts are identical and so can be shared. With complex facts it is costly to perform comparisons between facts to check for equality, and using sophisticated matching techniques such as hashing Creating hash totals or hash tables. See hash total and hash table.

hashing - hash coding
 or tree structures would probably use up more memory than is saved. One solution to this problem would be to only share facts where you can ensure equality of reference. For instance, if the same fact is to be asserted for a group of agents, then the fact structure could be created and stored and the same structure passed in for each agent. Another situation might be where agents can share knowledge with each other (through primitive communication). In this situation the agent which has the knowledge could just update the bit-string on the fact to represent the agents it has just "told" this information to.

On first glance, it may seem that some speed increases could also be achieved through the use of this technique. If an agent asserts a fact which is already known for some other agent, then we could simply synchronise Verb 1. synchronise - happen at the same time
contemporise, contemporize, synchronize

hap, happen, occur, come about, take place, go on, pass off, fall out, pass - come to pass; "What is happening?"; "The meeting took place off without an incidence";
 the state of the Rete node memories for both agents. The problem with this approach is that it is the combination of facts which determines the conflict set (set of rules which could fire for an agent), rather than a single fact, so we still need to perform a full Rete traversal for each agent that asserts a fact to perform unification with other facts that the agent knows. We are currently working on ways to avoid this traversal, based on using a shared conflict set for all agents, and storing back-pointers to fact bit-strings in node memories instead of the bit-strings themselves. In this way, we can scan the conflict set for a particular agent and recompute the unified bit-strings for a particular rule activation activation /ac·ti·va·tion/ (ak?ti-va´shun)
1. the act or process of rendering active.

2. the transformation of a proenzyme into an active enzyme by the action of a kinase or another enzyme.

3.
 to determine if the rule is valid for this agent.

Sharing Values

A technique used in some modern scripting language A high-level programming, or command, language that is interpreted (translated on the fly) rather than compiled ahead of time. A scripting, or script, language may be a general-purpose programming language or it may be limited to specific functions used to augment the running of an  interpreter designs is to share values in the system by means of a reference-counting system. For instance, Tel[Ousterhout, 1990] uses such a system, described in [Lewis, 1996]. A value stored in the field of one fact (such as a name field) may also be stored in another field in another fact (such as a target field which identifies the name of an agent's current target in a shoot-'em-up style game). Rather than duplicating all of this data, it is possible to share it by having it stored in one central location, and have facts store a reference to it. A simple reference counting (programming) reference counting - A garbage collection technique where each memory cell contains a count of the number of other cells which point to it. If this count reaches zero the cell is freed and its pointers to other cells are followed to decrement their counts, and so on  garbage collection A software routine that searches memory for areas of inactive data and instructions in order to reclaim that space for the general memory pool (the heap). Operating systems may or may not provide this feature.  scheme can be used to ensure that resources are freed at the correct time. This technique is only useful when data types are complex (e.g. strings, objects). With simple data types (integers, symbols) the amount of memory required to store them (an integer integer: see number; number theory  is 4 bytes) would be equal to, or even smaller, than the memory taken up by pointers in the reference counting scheme (a pointer pointer, breed of large sporting dog developed in England more than 300 years ago. It stands between 23 and 26 in. (58.4–66.4 cm) high at the shoulder and weighs between 50 and 60 lb (22.7–27.2 kg).  is typically also 4 bytes). So, value sharing is only useful where a majority of data types are complex.

IMPLEMENTATION

We have implemented a prototype rule interpreter based around the optimisations presented. The system (known as GORE--the Game Oriented o·ri·ent  
n.
1. Orient The countries of Asia, especially of eastern Asia.

2.
a. The luster characteristic of a pearl of high quality.

b. A pearl having exceptional luster.

3.
 Rule Engine), is a language neutral library which can be linked into an existing language interpreter (such as a scripting language) to provide pattern matching facilities suitable for the creation of rule based artificial intelligence programs. The library provides an API (Application Programming Interface) A language and message format used by an application program to communicate with the operating system or some other control program such as a database management system (DBMS) or communications protocol.  which can be used to create rules, assert and retract TO RETRACT. To withdraw a proposition or offer before it has been accepted.
     2. This the party making it has a right to do is long as it has not been accepted; for no principle of law or equity can, under these circumstances, require him to persevere in it.
 facts and to run a pattern matching cycle to select a rule to run. Callbacks are provided to allow a script associated with a rule to be run when the rule fires. This API approach is very flexible, as it allows the developer to choose the language in which the actions of the rules can be implemented, and allows any action in that language to be performed. We have implemented a prototype of the library, along with a binding to the Tel scripting language, as a proof of concept which can run toy examples with all the optimisations enabled.

CONCLUSION

We have presented a number of optimisations which can be used to enable rule based interpreters built upon the Rete algorithm to be brought to low-memory systems, in particular to computer games consoles. The techniques are designed to minimise the memory usage of the algorithm by ensuring a high degree of sharing of resources, while limiting the performance penalty of the changes. Each technique can be implemented separately and is useful independently of the others.

The techniques we described were developed for the Rete algorithm. However, other algorithms (such as TREAT and Rete*) which have much in common with Rete from an implementation point of view, may be able to have the same techniques applied. We are investigating the possibility of applying these methods to TREAT and particularly Rete*.

We are currently improving the performance of the prototype system, and making comparisons to existing Rete implementations in order to test the effectiveness of the optimisations.

References

[Forgy, 1982] Forgy, C. (1982). RETE: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19:17-37.

[Forgy, 1981] Forgy, C. L. (1981). OPS5 user's manual. Department of Computer Science Technical Report, Carnegie-Mellon University.

[Friedman-Hill, 2000] Friedman-Hill, E. J. (2000). Jess, the Java expert system shell. Available from http://herzberg.ca.sandia.gov/jess/.

[Giarratano, 2002] Giarratano, J. C. (2002). CLIPS User's Guide, v6.20. Technical Report, available from http://www.ghg.net/clips/download/documentation/usrguide.pdf.

[Jackson, 1999] Jackson, P. (1999). Introduction to Expert Systems. Addison-Wesley.

[Lewis, 1996] Lewis, B.T. (1996). An on-the-fly bytecode compiler compiler

Computer software that translates (compiles) source code written in a high-level language (e.g., C++) into a set of machine-language instructions that can be understood by a digital computer's CPU.
 for Tcl. In Proceedings of 4th annual Tcl/Tk Workshop, pages 103-114.

[Miranker, 1987] Miranker, D. P. (1987). TREAT: A better match algorithm for AI production systems. In AAAI-87 Proceedings.

[Nayak et al., 1988] Nayak, P., Gupta, A., and Rosenbloom, P. (1988). Comparison of the RETE and TREAT production matchers for SOAR. In Proceedings of AAAI-88.

[Ousterhout, 1990] Ousterhout, J. K. (1990). Tel: An embeddable command language. http://www.tcl.tk.

[Wright and Marshall, 2003] Wright, I. and Marshall, J. (2003). The execution kernel The nucleus of an operating system. It is the closest part to the machine level and may activate the hardware directly or interface to another software layer that drives the hardware.  of RC++: RETE*: a faster RETE with TREAT as a special case. International Journal of Intelligent Games and Simulation, 2(1):36-48.

Neil Madden mad·den  
v. mad·dened, mad·den·ing, mad·dens

v.tr.
1. To make angry; irritate.

2. To drive insane.

v.intr.
To become infuriated.
, School of Computer Science and IT, University of Nottingham The University of Nottingham is a leading research and teaching university in the city of Nottingham, in the East Midlands of England. It is a member of the Russell Group, and of Universitas 21, an international network of research-led universities. , UK
COPYRIGHT 2006 A.P. Publications Ltd.
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2006, Gale Group. All rights reserved. Gale Group is a Thomson Corporation Company.

 Reader Opinion

Title:

Comment:



 

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:ARTIFICIAL INTELLIGENCE
Author:Madden, Neil
Publication:Software World
Date:Jul 1, 2006
Words:4398
Previous Article:Top twenty viruses reported by Kaspersky in February.(Virus Notes)(Table)(Brief article)
Next Article:The law remains an ass: copyright and data protection in digitization projects.(SOFTWARE INTELLIGENCE)
Topics:



Related Articles
New technologies emerge in medical AI. (artificial intelligence)
Smart MACHINES.(robotics)(Brief Article)
An Introduction to Multiagent Systems. (Reviewers Choice).
AI agent application 1.0. (Internet Focus).(KazTrix AI Agent)(Brief Article)
$452m finance package set for downtown project.(FINANCE)
Midisoft releases Peter and the Wolf DVD movie and games.(Music Merchandise)
Answers to common questions about AI.(ARTIFICIAL INTELLIGENCE PART 1)
Applying evolutionary search to a parametric family of auction mechanisms.
IEEE (New York) has begun the publication of two new periodicals.
An immune agent for web-based AI course.(Artificial intelligence)

Terms of use | Copyright © 2009 Farlex, Inc. | Feedback | For webmasters | Submit articles