RPS Mechanics in Play-by-Post Games
Image source: wikimedia. |
Rock-paper-scissors only works in person because you can throw more-or-less simultaneously. In a play-by-post environment, someone has to go first. Here's how:
- Alice generates a random number and appends it to her choice.
Example: "paper04" - Alice takes a hash* of the result and shares it.
Example: "md5:fbe1a7f5e0330c5cf5a986d40065a21e" - Bob shares his choice.
Example: "scissors" - Alice shares her original string.
Example: "paper04" - Bob checks the hash of the original string.
It could be automated in some ways if you ran the forum, for example, a bot could automate the final check.
Weighted Selection from a Compact Table
It's common for a table in a book to be formatted like:1-10. Very common resultThis is useful if you want to mimic a specific type of distribution given a flat input curve. The theory is that if you use this table a lot, then it will make the results feel more natural.
11-15. Less common result
16-19. Slightly less common result
20. Very rare result
This presents a problem if you would like to automatically roll on the table in a spreadsheet. A naive way to do this is the format it like:
(A1) Very common resultBut this is time-consuming and annoying to change. Using VLOOKUP, you can format it like:
(A2) Very common result
(A3) Very common result
. . .
(A20) Very rare result
(A1) 10 (B1) Very common resultAnd then roll as normal. There is a (rough) proof of concept here. There's a couple mistakes in it, but if you play around with it you can see how it works.
(A2) 15 (B2) Less common result
(A3) 19 (B3) Slightly less common result
(A4) 20 (B4) Very rare result
Cols A & B are the actual table, while Cols C & D are for illustrative purposes and aren't necessary for the table to function. Cols E & F show how an automated roller might function.
* = I use DuckDuckGo as my default search engine. If you search "md5 [term]" it will auto-suggest the md5sum of "[term]", which is neat. Wolfram Alpha also does this.
No comments:
Post a Comment