Adds an option to use a deck of dice rolls instead of the normal dice.
Also adds an option to use dice with modified odds to make the rolls more even.
DOTO:
Add an option for the amount of dice decks to use.
Add option to reshuffle dice deck when a number of cards are left.
The modified dice rolls need a greater effect on the results.
Add option for flat dice distribution(results = rand(10)+2).
This is a protocol change.
Added option to use multiple dice decks (each one 36 cards).
Added option to remove an amount of cards from the dice deck.
Changed the dice deck option to a check box.
Removed an option from the previous patch that I decided I didn't like (was not implemented very well anyway).
Perhaps flat odds could be added later, but it think it removes an element from the game.
Cleaned up mode_turn by creating a dice roll function.
Hello Micah,
I've reviewed this patch (dice_deck_vrs_3.patch).
The code looks good.
As always I have some questions regarding the code:
Attached you'll find an updated version that does not result in compiler warnings and that is matched the current svn version (I had made some gint->guint changes in the meantime).
But for me the most important question is this:
What does the patch do?
This is my analysis:
Statistically, it will not change any of the odds of specific number in the long run (after e.g. 1 million rolls, the distribution will be similar to the current dice rolls).
Only in the short term, it will change something. When num_removed_cards is zero, it will even mean that the 36th roll can be guessed by the players in advance. Thus it will change the odds of each individual roll until the deck is shuffled again.
This patch can add a feeling of 'fairness' to the game, because the dice distribution will match the triangle shape very closely.
If you meant to reduce the aspect of chance in the game, I would suggest an extension to this code, to have each player be dealt 2 or 3 cards from the dice deck, and to let a player select from these cards the actual roll.
With kind regards,
Roland Clobus
PS: Regarding the flat dice option: I would suggest rand(12)+1 with 1 meaning 7. That will match rolling a D12 die.
The goal of the cards is to implement the Catan event cards variant from the Traders and Barbarians expansion, omitting the events on each card. With this expansion, 5 cards are removed before each year. The end of the year is when the deck runs out and is reshuffled. Removing 5 cards prevents people from counting cards to know what will roll last.
I agree that in the long run, the odds will be the same, but most games don't last long enough to require the deck to be shuffled 3 times. The last game I played, 12's rolled about 5 times where statistically it should have rolled only once or twice. In my opinion, If I win a game based solely on the dice favoring my numbers, I do not consider it victory.
I do like the idea that 2 dice cards are dealt out at the beginning of the game allowing a choice of the 3 dice cards to use. This would add more strategy into the game by adding a choice to play a high producing number, or a seven to have someone discard half their hand. I will test this out using the board game. If I like it, then I will work on it in a separate patch.
On this note, can we have two branches of the source code? This would allow protocol changes to be applied to the unstable branch, while the non protocol changes will be applied to the both the trunk and unstable branch. This way a patch can be created using a patch that is waiting for a protocol change. I know this does add more maintenance, because two branches will need to be maintained, but I think the benefits are worth it.
Using a D12+1 for the flat dice option is a good idea. The robber will be rolled on both a 7 and 1. This will have the odds of the robber be 1/6, which is the same odds as the normal rules. This however removes high and low production hexes which I feel is an important part of the game, however some will like this option.
I will work on the points you brought up, but lately things have been quite busy. Unless a protocol change is about to take place, it will be lower on my list of priority.
I've fixed the following hits:
Left for commit:
Ok, excellent patch.
Here is my review with just minor points. If the changes you made are trivial, go ahead and commit :-)
"Dice deck" -> "Use dice deck"
"Use dice deck instead of dice" -> "Use a deck of 36 dice cards instead of real dice"
"Dice decks" -> "Number of dice decks"
"Number of dice decks" -> "The number of dice decks (of 36 cards each)"
"Removed dice cards" -> "Number of removed dice cards" (This might be a bit long, but I think it is better to have a longer and more clear label.
"Number of dice cards removed after shuffling" -> "The number of dice cards that are removed after shuffling the deck"
See README.server_protocol_version for the steps required to increment the protocol.
Fixed patched and committed in svn rev 1910.
I would change the status of this ticket, but I don't seem to have the permissions for it.
I've modified the user rights. Please try again.