Unveiling the Strange Assembler

by Slaven

I recently came back to L5R from a multi-year hiatus, and have been very excited about a lot of the changes made to the game.  The dynamics of starting each player off with Border keep (or BKxp) is absolutely fantastic, although my lack of experience in using it had me asking several questions:  how many holdings should I use, what mix of holdings is acceptable and how likely given a mix of holdings am I to see a good gold flop by the second use of BK (or BKxp)?  I was troubled by these questions, and so I did what any good English major would do, and built a model of the first turn card flopping process in Excel, and then used a statistical software package to simulate 10,000 iterations of various holding layouts to answer my earlier questions.

Here is the most important part of my spreadsheet for the average user.  We have five different categories of inputs, which are the cells highlighted in yellow, and three outputs, which are the bottom three cells.

Based on your inputs, the model randomizes out a number of cards to ‘draw’, and then determines if it finds a valid combination of holdings in the revealed number of cards.

For my purposes, a ‘valid’ holding mix is one of the following:

  • Two holdings which cost 2g and produce at least 2g (including large farm)
  • One holdings which costs 2g while producing at least 2g (this also includes large farm), AND one holding that costs between 3 and your stronghold’s gold production number.  (This is cards like Remote Village or Recruitment officer, that the SH can buy, but BK cannot)
  • One holding which costs 6g and produces 5g.

The Strange Assembler is intelligent, and will use BK on a number of cards equal to what a real player would.  For example, if your initial flop has two Recruitment Officer cards and two non-holdings, it will know to BK for three cards, keeping one of the Recruitment Officer style holdings.  For the first flop of cards (non-BK), it models the region The Second City in a special way, and adding a card to the total number of cards you’ll see with BK and your second use of BK.

If the first BK use doesn’t produce a valid combination, the Strange Assembler will then intelligently flip another set of cards to see if you arrive at a valid combination of holdings after your second BK usage.

So how am I using the Strange Assembler?  The holding mix in the first graphic happens to represent the mix I’m using in a Lion deck.  Using the Strange Assembler and @Risk, a statistical analysis add-on package by Palisades, I can run the Assembler through 10,000 iterations to see what % of the time I arrive at a good gold setup by the end of my second use of BK (cell B15).

@Risk is kind enough to put out a graphic of the results of the 10,000 iterations of the Strange Assembler.  The “success after two uses of BK” variable is binary, with a success represented as 1, and a failure represented as a 0.  The green arrow here points to the successes, while the red arrow points at the failures.  Further, you can look on the summary information on the right and see that  the mean of these two is .971.  In other words, roughly 97.1% of the time, my Lion deck will see a ‘good’ gold flop by the end of the second use of BK.

Well, that’s good to know.  I’m a pretty risk averse guy, so 97.1% seems good enough to me.  I have a personal preference for using BKXP, but if I want to know how often I’m going to see a good gold flop if I were to use just regular ole BK, I can run the test using cell B13, which is the “Do I have success from the first use of BK” cell.

Again, 0 is a failure, and 1 is a success.  The mean of 10,000 runs of the Strange Assembler, given the earlier inputs, is .853.  Approximately 85.3% of the time, I’m going to see a valid gold flop from the first use of Border Keep.

This is the first in a series of articles on the stats behind the first turn gold flop.  I’m planning on discussing alternative gold schemes, how to run your own non-@Risk tests, The Second City, and maybe even a little bit of sensitivity analysis.

If you have any comments about my model, or this article, let me know.  I’d love to talk about it, and there’s a good chance that some of you math nerds out there know quite a bit more than I do about the numbers or the Excels.

2012.02.14 Strange Assembler v1.1 – Second City

21 thoughts on “Unveiling the Strange Assembler

  1. An an AI programmer, I approve of this use of the Monte Carlo simulations. You use computers to do what they’re best at, and with 10000 simulations, this should be accurate enough.

  2. As a scientist who spends ~50% of his week running various statistical models, this application of statistics pleases me greatly – thank you for sharing! Glad to see that geeky-stats love is shared by others in the L5R community!

    Can’t help thinking that there might be ways of improving this though. For example, adding in the option for X number of non-holding cards that would be preferred over any holdings seen on T1. Or alternatively, the number of non-holding cards that would not be BKed if they appeared on the initial flip.

  3. What if you have multiple events flip on turn one… Essentially drawing another card off the too of the dynasty deck. Does that get factored in as well? Is this even a factor? Seems like it would be.

    1. At the end of the day, flipping cards to the bottom that you don’t see doesn’t really change makeup of the deck. You still see the same number of cards, so it’s immaterial what the card was that got flipped to the bottom. I’m sure someone else can more eloquently put this than I can.

  4. I’m glad to see people get a kick out of this thing too. Thanks!

    @ Jimbo: That’s honestly an idea I hadn’t thought about. I flip just about any card under when I am fishing for gold. I’m not sure of a deck out that has a card that’s more valuable than a good gold start (excepting the freaky low-holding ToP deck).

    1. Well, there’s stuff like the Crab personality who can produce gold towards a holding, or Utemaro last arc? Utemaro, with his 3 gold production, would have been a more challenging twist to the system I think.

  5. Wow, this is exactly the kind of stuff L5R needs to help grow the competitive scene. Seriously awesome stuff and I will be sharing it with my playgroup. I’m sure there will be revisions and such but for a first iteration this gets nothing but kudos from me!

    1. You don’t have to. The categories of holdings work for any stronghold with 3, 4 or 5 gold production. The definitions are logical, rather than hard numbers. I”ve repasted the categories of holdings below.

      A. Holdings which cost 2g and produce at least 2g (including large farm).
      B. Holdings that cost between 3 and your stronghold’s gold production number. (This is cards like Remote Village or Recruitment officer, that the SH can buy, but BK cannot). For Unicorn, this covers Silk Works.
      C. Holdings which cost 6g and produces 5g.

  6. I’m playing around with your .xlsx and it’s returning “1” for BK 1st flip even if I put in 1 2g Holding and 39 non-SC non-Holdings. I think there might be something off with the provided download.

      1. Rock. Let me know if anything weird continues to happen and I can try and get it looked at/fixed. Thanks!

  7. Is there a plugin I need for the @Risk stuff? I only know enough Excel to muddle my way through and all I get are errors with the @Risk sheet in both Excel 2010 (well, the crappy free ad-bar version that comes with my version of Win7) and OpenOffice.

        1. I know for sure that there’s a 30-day free trial version of @RISK at the very least, maybe Randy has more information.

    1. Presumably, you could put them in the “Holdings costs 2G,” since the point of that entry is that you can buy them with either your Stronghold or Border Keep. But, I’m not sure if I’d put them there at all – Well-Tended is pretty bad as a gold producer, and the point is to make sure you get sufficient gold-producing Holdings out.

  8. Now I’m going to have to learn some statistics, so I can help extend this already fantastic work into a standalone program that can predict the likelihood of second and third turn gold. Getting a good first turn start generally isn’t my problem… my problem is generally only seeing holdings on that first turn.

Leave a Reply to RockyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.