Another insignificant improvement on the finite version. I don't know why, but I tend to sometimes get fixated on these puzzles.
Still only O(n^2).
Kingdom: Scrying Pool, Priest, Fortress, Cavalry, King's Court
Events: Advance, Inheritance, Triumph, Seaway
Ways: Way of the Horse
Setup (in no particular order)
buy Inheritance for Priest
buy Seaway for Estate
trash everything except
3 x Estate, 6 x King's Court, 7 x Priest, Fortress
<start of hand>
use Scrying Pool to draw entire hand
play 6 King's Courts
play 7 Priests, 3 times each, trashing Fortress (trashing a card now earns 42 coins)
play the 3 starting Estates, 3 times each as Way of the Horse, returning them and earning 9 buys
<buy phase>
buy 8 x Triumph, gain 8 Estates
buy Advance, trash Fortress, gain Cavalry, draw 2 cards
<action phase>
play Estates as Way of the Horse, draw cards ...
play Cavalry as Way of the Horse
return to buy phase
That comes out to 0.444 purchases of Triumph per activity.
Just for fun, here's a more contrived version using Conquest in place of Triumph.
Buy Capitalism
Seaway on Squire
Play a City Quarter, Priest, and an Ambassador so Scepter can replay them.
initial loop
<buy phase>
play Scepter, replaying City Quarter, draw cards
play available Crowns and Squires for +coins, +buys
play available Crowns and Scepters, replaying Priest, trashing Fortress
with available coins and buys,
buy mostly action cards at first, any action cards, for large City Quarter draw
also buy additional Scepters, Crowns, and Squires if still needed
buy Cavalry, draw 2 cards, go to action phase
<action phase>
play Cavalry as Way of the Butterfly, gain Mandarin, return Crowns, Scepters, and Squires from play, put Scepters on top
play Mandarin as Way of the Horse, draw 2 Scepters
After we get the trash benefit up to 102 coins and have 59 spare actions cards in our hand, we can fall into the VP gaining loop.
<buy phase>
play Scepter, replaying City Quarter, draw deck
play 6 Squires for +18 buys
play 9 x Crowns on 9 x Scepters, each replaying Ambassador, returning 36 Silver
buy 18 x Conquest, gain 36 Silver
buy Advance, trash Fortress, gain Cavalry, draw 2 Silver, go to action phase
<action phase>
play Cavalry as Way of the Butterfly, gain Mandarin, return Crowns, Scepters, and Squires from play, put Scepters on top
play Mandarin as Way of the Horse, draw 2 Scepters
Sadly, at 74 counted activities per iteration, that's only 0.243 purchases of Conquest per activity. Not nearly as efficient.
EDIT: The value of Triumph increases by an average of 1.125 VP per purchase, whereas Conquest's value increases by 2 VP. I am no longer entirely sure which is better, though I still think it's the Triumph. I think a more efficient Conquest loop could conquer it though. (lol, I wasn't intending to make a play on the names.)