It probably depends on the priority of units, but this is not a bug rather a suggestion. Cavalry is more powerful at flanking, so the game take it into account first I guess. It fills flank with cavalry, that has a flanking range of 5 at this point, and then you don't have space for your infantry. It could put 2 infantry, who have a FR of 2 at your point, and then 3 cav on each side, this would be better.
I don't think this is a bug, just that the code is too simple and probably displays:
- if you can put cavalry, put cavalry
- if you can still put infantry, put infantry
instead of
- if you can put infantry, put it, but not beyond what would allow the maximum number of cavalry flanking.
- then put cavalry up to the max
- then put infantry if possible.
Even if it was doing the first option, that does not explain why one cavalry unit is staying back each time. Either deploy three cavalry on each flank or just deploy two on each flank but there is no logic that I can see in deploying three on one flank, two on the other and keeping one cavalry unit in reserve.
- 1