All Forums > Hardball Dynasty Baseball > Hardball Dynasty > Double-Switch Help for Engine Update
12/6/2012 4:32 PM
All - I'm finishing up some moderate engine fixes and improvements and came across one I'd like some help on.

As you know, there are double-switches in the engine at the start of an inning. I'm trying to introduce double-switches in the middle of an inning when a reliever enters.

Here's the most common real-life scenario:
7th inning, Team A up by 3.
Team B gets a couple runners on.
Team A opts to bring in relief pitcher.
Pitcher spot is due up 2nd next inning.
Manager makes double-switch, with new left-fielder entering in P slot, P entering in LF slot.

Now, reliever can stay in beyond this inning half and won't be lifted for a PH.

Trying to do that in the engine is proving difficult because defensive replacements and/or player rest moves are done at the beginning of the inning half. So, if a reliever needs to be brought in, the manager can't find anyone on the def rep or player rest hierarchy to enter because they've already entered.

I've been thing of a couple ideas:
1) Consider bringing in a player rest player as part of double-switch 1 inning earlier than settings specified.
2) Consider holding off on 1 player rest / def rep if pitcher slot is due up next inning in the event of a pitching change. This gets a bit tricky because manage must decide which position to hold back (which factors in current spot in batting order) and must evaluate if pitcher will go more than one inning.

Let me know your thoughts and ideas.

If you have any existing boxscores where you think a double-switch should have occurred while team is in field, please post link and mention inning half and team.

Thanks
12/6/2012 6:11 PM
tzent, Its great to hear that an update is in the works, regardless of the scope!

If its the 7th inning I'm not as concerned about double switches as if its the 5th or earlier. By the 7th inning I want to get out of the jam, pinch hit if necessary and bring in the best Set up A pitcher for the matchups in the 8th and 9th as necessary.

And to be honest, double switches are used much less in the AL than the NL so this improvement effects only half the games played.

What else are you working on?
12/7/2012 7:27 AM
I think on a double switch like that the bar would be much lower on who is brought in. You wouldn't want to replace a superstar but if you have someone on your bench that's even close to the guy you are switching out then it would be worth it.

12/7/2012 8:14 AM
Rather than referring to the defensive replacement or player rest hierarchies when considering the mid-inning double switch, you may want to refer to the pitch hitter hierarchy first to select the player, and then refer to the def rep hierarchy to deternine who he's going to replace. 

I would assume that you're going to be less inclined to do a double-switch with a safe lead, so inserting a decent bat into the pitcher's old slot in the order would be driving the want/need for the double switch.  So it makes sense that the bat should come form the PH hierarchy.
12/7/2012 8:44 AM
This is awful tricky.  Seems like a programming nightmare.

The best way, IMO, is to refer to the defensive replacement chart for the first three hitters in the next inning.  If the player has no D-R listed, he stays in.   Of course, this is going to require the user to be a lot more precise with his settings because, if you don't want your star removed, you'll have to leave the PH/PR/DR/Rest boxes unchecked or have your star as the only player on the D-R list.    But, even then, your star hitter may have an iron glove and you want him out for the D-R when leading but not out when behind.    It's almost like you need a double-switch box and, for the amount of times it will be used, that's certainly not worth adding.  
12/7/2012 12:05 PM
I would think that using some logic that would move def-reps or rest options up an inning (or two) would be the first gate, while also going backwards through the lineup to get the longest gap until the P spot comes up again.

With no rest or def. hierarchiy to contribute (or having already been used), just go through the batting order backwards from the last out of the previous inning looking for a position where an available player on the bench is able to play (has that position listed, that is).  However, to Mike's point, anyone with one of the PH/PR/DR/Rest boxes unchecked would have to get skipped...or add a DS box?
12/7/2012 1:35 PM
My brain hurts.
12/7/2012 3:05 PM

1." Player Setting" ... subcategory" Edit Player Setting". Add "allow double switch" box/option. check or don't check the box. If the player who made the last out does not have the double switch option checked then a double switch doesn't happen.

2. "Manager's Office"... subcategory "Edit Manager Settings" Add "Allow Double Switch" box/option  ____ inning or later, stop double switch  ____ inning or later.  I.E. Allow double switch  5th inning stop double switch in the 8th.

3. Limit replacement players at a position to players on the "Defensive Replacement Hierachy". If no player listed remains no double switch occurs

4. Owners can adjust by altering pitch counts, and call bullpen settings for ptichers and change innings for rest player or defensive replacements options depending upon their priorities.

12/7/2012 4:35 PM
Posted by tecwrg on 12/7/2012 8:14:00 AM (view original):
Rather than referring to the defensive replacement or player rest hierarchies when considering the mid-inning double switch, you may want to refer to the pitch hitter hierarchy first to select the player, and then refer to the def rep hierarchy to deternine who he's going to replace. 

I would assume that you're going to be less inclined to do a double-switch with a safe lead, so inserting a decent bat into the pitcher's old slot in the order would be driving the want/need for the double switch.  So it makes sense that the bat should come form the PH hierarchy.
Agree, and maybe a 4th box on the Manager Settings. You already have a Very Conservative to Very aggressive rating for double switch, and add "Double switch when ahead/behind by ____ in the ____ inning or later".
12/7/2012 5:44 PM
That's a good idea.
12/7/2012 5:47 PM
I think they're hoping to avoid adding another option. 
12/7/2012 7:17 PM
Manger decides to bring in a new P (I assume nothing about that logic is going to change).

Either GM option or hard coded into logic -
Don't DS before inning # X.
Don't DS if winning by more than X.
Don't DS if losing by more than X.
Don't bring in any player set to Rest.
GM can turn this on / off in the settings.

If P is due up in the 1-3 spot next inning -

If I'm winning -

Of the players due up in the 7-9 slots next inning, perform the DS that gives me the best D boost or the smallest D loss.
(Assumptions - I don't care if I add Off. Any non-P batting is better than a P batting next inning or having to PH and change P.
Indicator is set so the player brought in is not PH for.)

If I'm losing or tied -

Of the players due up 7-9 next inning, perform the DS that gives me the best Off boost or the smallest Off loss.
(Assumptions - I want to score more runs. Get the best bat in there next in. The one Mgr would probably select to PH.)

Assumptions -

You're not going to take on moving players to different positions. If, for example, the player who comes in is my best D SS and the player being removed is in LF ,that SS is going into LF, not SS and then the current SS moving to LF (or CF, who them moves to LF.)

Player rest is generally set to take place only in blowouts. So if rest logic kicks in, nobody is going to care if the DS logic doesn't happen or is not optimal. DS not likely to impact the result of the game.

Suggestions -

There will be cases where one of the results of DS will be less overall Def than would have been on the field if no DS had happened & Def Rep had come in. A reason why it would save WIS a lot of grief it there's a DS on/off option that can be set by each GM.

Don't hold off on Def Rep for the sake of a possible DS next inn. OK to hold off on Rest move if possible DS next inn. First pass at thinking this through, this extra logic might be more trouble to code than it is worth.

Compared to other aspects of HBD that there seems to be consensus that could be improved, this entire topic is somewhat like tossing a few bricks into the Grand Canyon and then claiming you're working on filling in the big whole. Only in this case tossing those bricks is probably a lot of work.
12/8/2012 11:01 AM
I get way more ****** off about the state of the Hall of Fame than thinking about double switch logic.  In fact, I rarely think about double switch logic at all, but I get ****** off about the Hall of Fame's problems every season with every team I have.
12/10/2012 10:58 AM
Posted by MikeT23 on 12/7/2012 5:47:00 PM (view original):
I think they're hoping to avoid adding another option. 
Then use one of the player rests and change the other one to "Rest players when winning/losing by ___ in the ___ inning or later".
12/10/2012 11:00 AM
Posted by shobob on 12/8/2012 11:01:00 AM (view original):
I get way more ****** off about the state of the Hall of Fame than thinking about double switch logic.  In fact, I rarely think about double switch logic at all, but I get ****** off about the Hall of Fame's problems every season with every team I have.
Way to prioritize what's important in the game.
of 3
All Forums > Hardball Dynasty Baseball > Hardball Dynasty > Double-Switch Help for Engine Update

Terms of Use Customer Support Privacy Statement

Popular on WhatIfSports site: Baseball Simulation | College Basketball Game | College Football Game | Online Baseball Game | Hockey Simulation | NFL Picks | College Football Picks | Sports Games

© 1999-2014 WhatIfSports.com, Inc. All rights reserved. WhatIfSports is a trademark of WhatIfSports.com, Inc. SimLeague, SimMatchup and iSimNow are trademarks or registered trademarks of Electronic Arts, Inc. Used under license. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.