New Content - Implemented Calculate & display expected yield for each Porko slot

Veracity

Developer
Staff member
We have a setting - arcadeGameHints - which determines whether we provide spoilers for various games.

According to greycat in the Porko Wiki page, "I made movies of it with xvidcap and played them back and paused them to see what was happening. The image seems not to matter. The peg style number as revealed by mouse-hover is what matters. Peg style 1 goes right, peg style 2 goes left, and peg style 3 is random, regardless of the image-to-style-number mapping."

Revision 9396 parses the game board when we first visit it and stores it in lastPorkoBoard. Each peg is listed left to right, top row to bottom row, as 1, 2, or 3.

Given that, it's a Simple Matter Of Coding to start at each slot in the top and calculate exactly which bottom slots are accessible in which proportion and thereby determine the Expected Result of taking each top slot.

Well, come to think of it, we DO need to store what payoff each bottom slot yields, too. Coming up in a revision near you...

I envision annotating each slot in the Relay Browser with the expected payoff of taking it - if the setting says we should give game hints - just as we annotate each choice in Fighters Of Fighting to let you know which ones will be the most successful.

Actually automating running the game and turning Turns into Lunar Isotopes can be left to scripts - although such scripts would be simpler if we publish the KoLmafia-calculated Expected Yields in settings, rather than just the board layout and bottom slot payouts.
 

Veracity

Developer
Staff member
Revision 9398 adds lastPorkoPayouts setting to store the payouts - 0, 1, or 2 - for each of the 9 exit slots.
 

Veracity

Developer
Staff member
OK, I wrote up the algorithm. I hope it is correct! When you start a Porko session, we look at the board (and store it in lastPorkoBoard and lastPorkoPayouts) and calculate the expected value of dropping the token in each slot. We store those values in lastPorkoExpected:

> get lastPorkoExpected

1.05:1.05:1.00:0.95:0.89:1.22:1.22:1.36:1.50

Additionally, if you have arcadeGameHints = true, when you visit the game in the Relay Browser, we replace the hover text for the "Start Here" arrows to be the expected value of that slot, as in the above setting. That might be a little subtle, since you have to move your mouse over each arrow and decide which one to click, but that table full of divs and images was a bit too much for me to modify, given the time I wanted to devote to coding this.

Revision 9399
 

Veracity

Developer
Staff member
Is the one in quest an actual puzzle? My multi and I have each been through the quest once and each "solved" it with the very first try by simply selecting the leftmost slot.

That's the kind of thing you can do once per ascension, so I'll look at it again when I get there again. I't be easy enough to refactor the code to solve the actual game, I expect; if you have to exit from the center slot in the bottom, simply set the payouts to 000010000 and see which of the top slots give the expected result closest to 1. If there is a guaranteed way to win that quest puzzle, one of the results will BE 1.

A DEBUG log of visiting a URL and seeing that puzzle would be helpful, if you get there again before I do.
 
Thanks! This will really help my isotope farming. Man, there are some really bad boards out there, just found one where the best results are predicted at 1.33.
 

roippi

Developer
Remarkable speed on this one, Veracity. Kudos.

Would working on a relay override to display all the values on-screen simultaneously be a worthwhile use of my time, or is native functionality planned for that?
 

Veracity

Developer
Staff member
Well... I'd sure like for all the values to be visible in the standard Relay Browser. But I looked at the table full of divs and images and threw up my hands. I just didn't have time. But, as you observed, I made the expected values available in a setting for use by scripts - either Relay overrides or automation scripts; isotope farmers, so to speak.

If you make a good looking Relay Override, I can probably incorporate your work into the native Relay Browser, since you'll have to manipulate the HTML the same as I would.

Go for it! :)
 

Winterbay

Active member
Is the one in quest an actual puzzle? My multi and I have each been through the quest once and each "solved" it with the very first try by simply selecting the leftmost slot.

That's the kind of thing you can do once per ascension, so I'll look at it again when I get there again. I't be easy enough to refactor the code to solve the actual game, I expect; if you have to exit from the center slot in the bottom, simply set the payouts to 000010000 and see which of the top slots give the expected result closest to 1. If there is a guaranteed way to win that quest puzzle, one of the results will BE 1.

A DEBUG log of visiting a URL and seeing that puzzle would be helpful, if you get there again before I do.

That indicates to me that it may be an autosolve on that one. I clicked the middle one and it worked (my last adventure of the effect as well luckily...). Also, I never even saw anything move in that like it does in the porko ones.
 

Veracity

Developer
Staff member
Somebody sent me a DEBUG log with the Big-Time Generator. I refactored the porko solver and set up a test command.

> test load generator.html

Read 40,624 bytes

> test generator

> get lastPorkoPayouts

000010000

> get lastPorkoExpected

1.00:1.00:1.00:1.00:1.00:0.75:0.38:0.25:0.00
It is not an auto-solve.

I'll look into solving and decorating it, by and by.
 

Veracity

Developer
Staff member
Revision 9402 purports to solve and decorate the Big-Time Generator in the same way as the Porko game: the hover text for each entrance slot will be the probability of winning the game if you take that slot.

Untested.
 

Veracity

Developer
Staff member
Heh. I had one of my test multis buy a couple transporter transponders and solve this quest. The Big-Time Generator worked as expected: if you have arcadeGameHints set to true, it showed the probability of winning in a particular slot.

The game board was different from that in the DEBUG log I was sent, with different probabilities.
 
Top