My friends and I in school play this interesting card game, which we call 'the game without rules' (ironically, of course). The game is like this: in the beginning of a school year, we start with one rule: you have to lay a card that is higher. Everything else is not allowed and the one who is the first to have no more cards, wins.
When only one person remains with cards, the game ends. At that point, the winner can define a new rule, such as "on a seven, you have to play a lower card instead of a higher card". This makes the game harder and harder as we play on. Every time a person breaks a rule, he/she is given an extra card.
Now my idea was to make a computer program out of this and let them create new rules, so that would be pretty funny to see what combinations they come up with. Every time a 'computer' defines a new rule, they don't tell the others, so they have to figure out by trial and error.
Well at this point I am stuck. How can I let the computer define new rules and can someone write an example for me? And in what language should I do it?