Mario Hilgemeier

rulerule

April 1995

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 elsewhere (use Google).

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 unpaid overtime at megatel GmbH, D-28359 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 me.

Thank you.

Mario Hilgemeier




Download NeXT Interface Builder and Objective-C files (1995) rulerule.gz

Java 2012, version playable under Eclipse Luna, unfinished. Contains notes and design diagrams for possible future development. Doxygen-documented.

Javascript version playable locally in browser (GPL 2014 by Jan-Hendrik Vienup, tested for Firefox, MSIE, Safari, and Chrome); 

play onlinerulerule_2.jpg.
go to sourceforge to get the html and the icons in a single file RuleRule3.zip.

Algorithms and Program Codes


© Copyright 1994-2015 (where applicable) Mario Hilgemeier, email: contact
homepage stylized apple blossom