Bringing a cricket-style lineup to baseball

One of the trickier design problems in O27 came from borrowing a concept from cricket: what if batters had a fixed order that resets mid-game, instead of cycling through the same 1–9 every time?

Cricket's actual batting order rule is strict: bat in position, get retired once out, all-out ends the inning. But O27 doesn't have dismissals like cricket does. I considered letting a guy hit for a lot of at-bats in this sport, but it felt too distant from baseball. So I opted to borrow from Finnish pesäpallo instead, giving batters a chance to use their at-bats more strategically with each strike being able to hit into play to advance runners.

The other thing we took from the Finnish game is adding 3 designated hitters ("jokers") who can replace any batter in the lineup at any time once per cycle through the order. This rule also changed over time, initially there was no cap but the AI engine would just use jokers the entire game and no one else and I thought that was both boring and unrealistic. In a real-life game, I'd probably have more creativity, but for a python simulation PC baseball variant, I opted for simplicity.

One of things I'm still aiming for with O27 is variety. As I started researching T20 cricket more, I started wondering if strategically it'd be possible to get strategic about lineups. Rather than allow for chaos, I though the easiest way was a more serpentine batting order.

The Answer: The Flip

The trick was making this an either/or thing. So when a team cycles through their entire lineup without using a joker, they earn the ability to flip—reverse the batting order for the next cycle. You don't have to do this, managers can opt not to, but most will if they don't going to use the joker.

From Automatic to Strategic

I initially built it as automatic. Cycle through without a joker, flip the order, done.

But that missed something important: the choice. So I reframed it:

Earned: You only get a flip if you make it through a cycle without burning a joker.

Use-it-or-lose-it: The flip applies to the first batter of the new cycle. If you don't use it then, it's gone.

Manager personality: Some GMs are "flip-aggressive"—they plan around reversals. Others hoard jokers and never flip. This stat drives emergent behavior.

Regulation only: Extras are played straight; no flips allowed.

The reason for doing this structurally and strategically was both about manager variety, but also situational baseball. There are some situations where using your joker makes more sense, and there are others where you'd decide to go relatively joker-free but if you didn't you could set your lineup in an inverted way.

The Valley: Lineups Built for the Flip

Then came the follow-up question: if your order flips, and you lead the next cycle with your #9 hitter (typically the pitcher), you've just tanked your own offense.

Smart managers learned to build differently. They construct what we call a "valley" lineup:

Best hitters placed on the outer edges (1st and 9th).

Alternating inward with mid-tier talent.

When flipped, the order stays strategically sound. You don't lead off with the pitcher—you lead with a strong bat.

Handedness is balanced within the valley to avoid clumping same-handed hitters together. The constraint is hard: you can't chase handedness if it breaks the symmetry. A manager who tries to optimize too far ends up with a broken valley.

Why This Matters

The flip is a small mechanic, but it cascades:

It rewards forward planning. Managers who think one cycle ahead build better lineups.

It creates genuine tension. Do you use your joker now to avoid a dangerous matchup, or save it to prevent the flip and keep your order intact?

It surfaces personality. A rebuilding GM might flip constantly and experiment. A win-now team might hoard jokers and play it safe.

One of things I really wanted was the tactical complexity that gridiron football gives you, adjusted into baseball more. My friends in Finland talk about liking NFL because it's really a tactically complex sport and there's nothing like it, but Finnish baseball has some of the same kind of things happening -- on a smaller scale -- relative to most baseball, and I wanted to find ways to graft that onto the O27 landscape.

To be honest, I haven't spent a ton of time with the data on lineup flips to see what kinds of stats point to better team construction, but It'll be a really data-rich thing to investigate once I get there.

What changed on the engineering side:

Optional per-league rule (leagues can turn it on/off like Power Play).

Manager personality stat (mgr_flip_aggression) derived inversely from joker aggression.

Valley lineup construction algorithm that enforces directional talent balance.

Full test suite covering flip earn/use/lose logic, gate behavior, and valley structure validation.