Sorry, due to internet transfer failures,
previous rulerule#.compressed files
may be unreadable or useless. 
They are now replaced by rulerule4.compressed.

rulerule is a game which might be of interest to students and researchers of AI, machine learning and related areas.

In this game, rules act and modify other rules (including themselves). 
The goal is to reach a desired condition (e.g. a checkerboard of red and yellow).

Full Objective-C source code is given.

Currently (1995-04), you can also reach me at
mhi@vent.winnet.de
Home address will change in May 1994.

The text of the online help follows.





rulerule
a graphical game, playing with rules acting on rules

Contents
- Goal
- Rules
- Strategy for "all one"
- Opponent
- History
- Evolution

Goal
The goal of the game may be one of the following:
- "all one": all buttons colors are changed into the same color.
- "4 times 6": the buttons are changed into 4 groups of 6 buttons. 
In a group each button shows only one color (e.g. an all-white 
button).
- "pattern": a pattern of choice is designed (e.g. alternating black 
and white stripes or a red/yellow checkerboard)

Rules
Each button is like specific tool (or rule) for changing colors. For 
example, a button that has black on its left side and white on its 
right with the word "left" written below will change the LEFT color 
of a button from black to white.
In other words, each button can be "read" in the following way
(inserting the appropriate for the words in braces):
"Change the {button inscription} color from {left color} to {right 
color}."
If the button of the above example is applied to itself, the button 
will become all white and quasi-defunct because a change from white to white is no real change.

The blue button will change the word "left" to "right" and vice 
versa for all buttons. If you accidentally activate the blue button: use it on itself - its function will not be changed.

If you accidentally activate a button you do not want to use: click on the blue button. Although this will generate an error panel there will be no side effects.
 

Strategy for "all one"
The rules that lead to the desired color are used on the right sides of other rules until all rules (except, of course, the blue one) lead to the desired color. Then the remaining rules are each applied to itself.
There should be no need to use the blue button when playing without opponent (although it helps).

When playing with opponent, note which buttons are changed most often and avoid to use them for important rules.

Opponent
The computer can act as opponent to the player to make the game more interesting. The tactics of the opponent is set in the Opponent menu:

Type   Opponent
0       none
1       noise (random changes)
2       attack majority 
3       attack minority

A level setting of 3 with goal "all one" will not oppose but help 
(clumsily). The same is true for goal "4 times 6" and level 2.

At present, the opponent does not adhere to the rules but can change rules arbitrarily!

History
rulerule was inspired by the game MUTABOR (designed by Karsten Theis) on Oct 31, 1994 during a stay with Markus Fix at the IFNM Frankfurt (IFNM = Institut för  Neue Medien). MUTABOR itself was inspired by Douglas R. HofstadterÁs game of meta-chess. 
This program was designed and implemented in
November 1994 by Dr. Mario Hilgemeier in about 15 hours work, crystallized from overtime at megatel GmbH, D-28203 Bremen, Germany.

Evolution
No code is perfect, therefore NeXT ProjectBuilder-files and Objective-C sources for this program are supplied to enable programmers to implement new features. These might include:

- Opponents acting under the same constraints as the user (i.e. no arbitrary rule-changes any more!)

- Opponents that use a strategy to reach their own goals

- Extended Rulespace, e.g. changes to blue rules, more colors, larger matrix etc.

I'd like to know about offspring of this program, because I will probably make no further updates. If you've done something to evolve this program or want to make any comments, please email to mhi@megatel.de or send smail to Dr. Mario Hilgemeier, Charlottenstr. 19, D-28203 Bremen, Germany. 

Thank you.

Mario Hilgemeier

