Nomyx in Zurihac

Published on September 30, 2017

In last June I presented my game Nomyx in Zurihac. ZuriHac is a three day Haskell Hackathon hosted at the HSR University in Switzerland. It’s always a nice and fun experience meeting all the Haskell hackers! And the place is not bad really, just look at the lake view below.

The view from the university

It was the perfect occasion to play some Nomyx matches! We played 3 matches during the Hackathon (on Saturday and Sunday). Each match lasted one hour roughly. I archived the matches on the game website. Unfortunately something went wrong when archiving, so some links might be missing…

First match

The brave contestants were:

Game 2

At the dawn of the game, there was only one rule in the constitution: AutoActivate. This rule could also be called “Anarchy”: any new rule proposed by the players will be accepted and activated. To test this mechanism, several Hello World was proposed. They was automatically accepted and a message “Hello World” was displayed in the Action tab. Of course the AutoActivate rule is not suitable for a multiplayer game: any player could post the rule “I win” and win the game. That’s exactly what player fabianbaechli tried to do (although there was an error in the player number in the code of the rule). The idea is to quickly change the initial rule with some sort of democracy, where players have to vote on new rules.

The players decided to go for a democracy, where everybody can vote and the rules are accepted if unanimity is reached. Quickly after, the AutoActivate rule was suppressed.

From now on, any new rule proposed by the players will require that all other players vote for it. In practice, when a player proposes a new rule, it will not be accepted immediately: it is put in the pending rules. The unanimity vote rule will then display some fields in the “My actions” panel of each players: “Do you accept or reject the new rule?”. When all the players voted, the rule is accepted or rejected.

Of course, a unanimity vote is quite hard to obtain! For example, this rule was rejected. So, we decided to transition to a smoother type of democracy. We switched to a simple majority vote and deleted the unanimity vote. Votes will pass with more than 50% of “yes”, with minimum 2 voters to be valid. The vote finishes after maximum one day, even if not all players voted. Display votes was proposed to monitor the progress on the votes.

That’s all well and good, but how to win this game?? Well, let’s invent a rule for that! The game will be won with 5 rules accepted. Of course, you can bet that if you get close to the victory, the other players will change that rule. That’s what happened a bit latter: player sphynx proposed to push the victory to 10 rules accepted. After several attempts, players jship and sphinx also proposed a rule to monitor the number of rules won by each player.

To put a bit of salt in the game, we created a currency: the ECU. This money is stored in bank accounts. A specific rule allows to display the amounts for everybody. We win 10 ECU per minutes. However, any new rule accepted costs 50 ECU! A rule cannot be accepted if you don’t have the funds.

The game then took a turn in the science fiction realm: several planets appeared on our radar! The planet and owners are displayed with this rule.

At this point another modification in the democracy was proposed: lower the vote delay from one day to 5 minutes. This allows to close a vote after 5 minutes only, even if not all players voted. However, the rule proposed had a mistake! The code includes suppressRule_ 13 >> autoDelete, which does two things: first, it deletes the previous “majority vote”. This is correct. But it also suppresses itself! At this point, there is no more voting rule active! The game is then stalled.

Result of game 1: draw game.

Second match

Here are the brave players that joined the game:

Game 2

As usual at the beginning of the game, there was only one rule in the constitution: AutoActivate. Of course as explained this rule is not be suitable for a multiplayer game: any player could post the rule “I win” and win the game. However, player nomeata was faster: he posted the rule “I win” and therefore won the gane!

Nomeata: 1 All others: 0

Of course this is just a trick and we decided to continue this game. The players decided to go for a democracy, where everybody can vote and the rules are accepted on a unanimity. Quickly after, the AutoActivate rule was suppressed, together with nomeata’s “I win” rule. We were left with only a unanimity rule in the constitution. From now on, any new rule proposed by the players will require that all other players vote for it. Which is hard to achieve! In fact player agrafix tried to propose to open some bank accounts for everyody, but it was rejected. Who vetoed it? That’s a mystery, because the ballots are secret at this stage. To change that, the next rule proposed was display votes. It’s very handy to see who voted what on on-going votes and finished votes.

Player agrafix then decided it was time to become King. Make King it a rule that simply creates a variable with the name of the King. If the monarchy is passed, this player will then be the only one to decide on any legislation. Strangely, the other players choose otherwise… And the rule was rejected.

Another unsuccessful attempt at creating bank accounts showed that is was time to tweak a bit our democracy. We changed for a majority vote and deleted the unanimity vote. The bank accounts was finally accepted. Oooff!

Nomeata tried to sneak a victory again with a rule which is not entierely honest… Never trust a rule on its face value, always read the code!!

We started filling our new bank account with some money. 100 ECU was awarded to every players every minutes.

The game was finally won by mbhr, under a similar idea than nomeata.

Game 3

In game 3, we tried to go a bit further. We went immediately for a majority vote. Bank accounts were created, with monies for everybody. You had also the possibility to give money to other players. I also proposed to create planets, and this time we gave the planets some owners. A rule to attack planets was also proposed!

Finally, we succumbed to monarchy. The game stopped here, for a lack of time if I remember. Too bad we did not continue, I’m curious to see where this was going!

Conclusion

That was a great experience playing those games, and I took a lot of notes ;) To compose your own rules, you can use the web UI. But in my opinion it is more convinient to just fork the rule library and use your own Haskell environment! You can then push your rules to any live game using nomyx-client. After the matches, jship and berdario submitted pull requests with their rules! There is still a lot to do, but it’s great to see things taking shape.

Comments