so you have got it right... right now the GE considers substitutions in isolation. The problem is how to design an algorithm that does what you want it to do .. ie maximize the total lineup without considering all possible lineups, because that is computationally impossible given the time constraints (we have to be able to run a lot of games relatively quickly).
Now i'm open to ideas, and I will think about ways that could do a better job or approximate what you are saying. LIke for instance, i could simply run the isolated substitution algorithm twice, which would sometimes result in someone coming out at one position and being put in another.
I could probably handle consider all permutations of switching the positions of the players who are on the court... ie see if it would be better if the PG played SG and vice versa.
I'm less certain, but perhaps we could consider maximizing substitutions in pairs, like I could consider maximizing the PG/SG, then independently maximize the SF/PF, then the C. That would just be ~ 2*12^2 + 12 combinations as opposed to 12^5 combinations.
or actually here's a better idea. What i currently do is take a look at each of the 5 positions and have the coach look down the bench and consider how much better it would be to put in each of the bench players. I does this for each position and picks out the position that is in the most need of substitution. what i could do is also let it look at the players on the court and evaluate how much better it would be to swap them in.. of course minus the loss of having to replace that player at his current position with players only from the bench.. so sort of stop the logic 1 level deep so it doesn't run away.