Skip to content

Sample Random Rule Generator

Raluca D. Gaina edited this page Feb 12, 2018 · 1 revision

It is a naive rule generator. The main idea is to generate any random amount of interaction and termination conditions that compiles.

The interaction rules are picked in the following manner:

  1. Pick two random sprites found in the current level (EOS is included)
  2. Pick a random interaction from all the available interactions
  3. Pick a random increase or decrease for score
  4. Test if the interaction rules works:
    • Yes: Add it to the previous rules
    • No: Pick another random interaction from all the available interactions
  5. Repeat the previous step till you get a fixed number of interactions.

The termination conditions are much simpler, the system adds two termination conditions. One for winning the game and the other for losing the game. The lose condition is always fixed to when the avatar dies but the winning condition is either time based (after a fixed amount of time) or when the number of a certain sprite reach zero.

Table of Contents:

Clone this wiki locally