Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/rule/README @ 13402

Last change on this file since 13402 was 6152, checked in by bfarka, 14 years ago

added ecj and custom statistics to communicate with the okb services #1441

File size: 2.4 KB
Line 
1This package contains classes for representations of the form of arbitrary
2collections of objects.  One common use of such collections would be as
3bags of "rules", hence the name.  However there's no reason you couldn't use
4any kind of object here.  Also don't be put off by the name "ruleset" -- it's
5not a set of rules, it's a collection (a bag, a multiset) of objects, that is,
6there's no reason the object can't appear more than one time.
7
8The package is very straightforward.  A RuleIndividual contains a fixed-length
9array of RuleSets.  Each RuleSet is an arbitrary-length array of Rules.
10A Rule is the superclass of your basic object.
11
12RuleIndividuals must belong to RuleSpecies (or a subclass), which does trivial
13checks.  Various RuleSets are associated with a RuleSetConstraints object
14in which they can store common information.  Presently RuleSetConstraints
15specify:
16
17  - the minimum number of rules allowed in the RuleSet upon initialization
18  - the maximum number of rules allowed in the RuleSet upon initialization
19or
20  - a distribution from which the number of rules is drawn
21
22Additionally:
23
24  - The probability that new rules will be added upon mutation
25  - The probability that new rules will be deleted upon mutation
26  - The probability the rules will be randomized in order upon mutation
27
28You're welcome to modify this as you see fit of course.  Rules are likewise
29associated with RuleConstraints in which they can store common information
30(presently nothing is stored).
31
32To set up the constraints objects, the rule package requires that your
33initializer be a subclass of RuleInitializer.
34
35The 'breed' directory contains two breeding pipelines which might be of use.
36RuleCrossover trades rules among rulesets using the following algorithm:
37
38  For i from 1 to the number of rulesets
39    r1 = ruleset i in individual A
40    r2 = ruleset i in individual B
41    For each rule in r1
42      With a given probability,
43        mark that rule to go to r2
44    For each rule in r2
45      With a given probability,
46        mark that rule to go to r1
47    Exchange marked rules between r1 and r2
48
49You specify the rule exchange probability.  The RuleMutation operator simply
50calls mutateRules() on all the rulesets.  The default mutateRules() function
51first calls mutate() on al the rules in the ruleset.  It then deletes rules from
52the ruleset with a certain probability.  It then adds new rules to the ruleset
53with a certain probability.  Finally it randomizes the rule order of the ruleset
54with a certain probability.
Note: See TracBrowser for help on using the repository browser.